摘要: 类的内置方法 它与内置函数有紧密的联系,有的内置函数就是调用的内置方法。 在顶级父类obj中有: 两个双下方法 obj.__str__ str(obj) obj.__repr__ repr(obj) 1、__str__ 与 __repr__ 1 class Teacher: 2 def __init 阅读全文
posted @ 2019-12-16 19:43 四方游览 阅读(264) 评论(0) 推荐(0)