issubclass()&isinstance()、type()&dir()、属性之增删改查、算数运算符重载、str()&repr()
[out]: True
[out]: False
[out]: True
[out]: True
[out]: False
[out]: True
[out]: True
[out]: True
[out]: True
[out]: __main__.MyClass
[out]: type
[out]: type
[out]: function
[out]: builtin_function_or_method
[out]: list
[out]: True
[out]:
[out]: True
[out]: True
[out]:
[out]:
[out]:
[out]: True
[out]: True
[out]: False
[out]: 2
[out]: '查找的属性或方法不存在'
[out]: False
[out]:
[out]: '__add__'
[out]: __add__
[out]: __add__
[out]: <__main__.MyClass at 0x2403ead4cc0>
[out]: <__main__.MyClass object at 0x000002403EAD4CC0>
[out]: '<__main__.MyClass object at 0x000002403EAD4CC0>'
[out]: '<__main__.MyClass object at 0x000002403EAD4CC0>'
[out]: <__main__.MyClass at 0x1fbfffd7cc0>
[out]: str__
[out]: 'str__'
[out]: '<__main__.MyClass object at 0x000001FBFFFD7CC0>'
[out]: repr__
[out]: str__
[out]: 'str__'
[out]: 'repr__'
[out]: repr__
[out]: repr__
[out]: 'repr__'
[out]: 'repr__'
[out]: 'Hello, \nworld'
[out]: "'Hello, \\nworld'"