wob*_*col 3 python
假设Python中的对象具有所有魔术方法的默认实现(由双下划线包围的那些,例如__init__),我是否正确?
__init__
use*_*ica 6
没有.
>>> object.__add__ Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: type object 'object' has no attribute '__add__'
他们中的一些确实有默认实现__init__,但是大多数都没有.
归档时间:
12 年,2 月 前
查看次数:
118 次
最近记录:
11 年,10 月 前