Lel*_*uge 4 python file-io class
我已经在我的
When I中定义了__str__and ,它工作得很好。
当然,将 stdout 重新定义为对象并调用会将字符串表示形式写入文件,但这是最 Pythonic 的方法吗?__repr__class fooprint foo()fileprint foo()
| 归档时间: |
|
| 查看次数: |
2934 次 |
| 最近记录: |