标签:__repr__

共 1 篇文章

Python __repr__与__str__方法在调试信息中的区别

Python repr与str方法在调试信息中的区别 在 Python 调试过程中,直接打印自定义对象往往只能看到内存地址(如 <main.Point object at 0x7f

# Python # __str__ # __repr__
2026-04-27 134 0