[issue10649] Attempting to override special methods of a function object does not cause an error

2010-12-08 Thread Éric Araujo
É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 ___

[issue10649] Attempting to override special methods of a function object does not cause an error

2010-12-08 Thread Éric 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

[issue10649] Attempting to override special methods of a function object does not cause an error

2010-12-07 Thread Chinmay Kanchi
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

[issue10649] Attempting to override special methods of a function object does not cause an error

2010-12-07 Thread R. David Murray
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