Hallvard B Furuseth
h.b.furuseth at usit.uio.no
Wed Jul 21 12:24:34 CEST 2004
What's the difference between a built-in method and a method-wrapper
object? Why has only the former a __self__, even though both are
tied to the object on which to perform the operation?
Why do list.pop and list.__len__ have different types at all?
Traceback (most recent call last):
File "<stdin>", line 1, in ?
AttributeError: 'method-wrapper' object has no attribute '__self__'
<built-in method pop of list object at 0x1c3770>
<method-wrapper object at 0x1bf210>
<method 'pop' of 'list' objects>
<slot wrapper '__len__' of 'list' objects>
More information about the Python-list