Éric Araujo mer...@netwok.org added the comment:
More info:
http://docs.python.org/dev/reference/datamodel#special-method-names
http://docs.python.org/dev/reference/datamodel#special-method-lookup-for-new-style-classes
--
nosy: +eric.araujo
___
Éric Araujo mer...@netwok.org added the comment:
Oops, that second links has been renamed:
http://docs.python.org/dev/reference/datamodel#special-method-lookup
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10649
New submission from Chinmay Kanchi cgkan...@gmail.com:
Attempting to override a special method of an object of a builtin (like list)
raises an AttributeError. This is obviously by design. However, doing the same
to a user-defined function object seemingly replaces the function, but does not
R. David Murray rdmur...@bitdance.com added the comment:
As you observe, the attribute is not read only, it simply isn't referred to
when special method lookup is done. This is specified as part of the language
design for new style classes, but has only been made consistently true in
recent