[issue643841] New class special method lookup change

Nick Coghlan report at bugs.python.org
Sat Mar 29 04:47:29 CET 2008


Nick Coghlan <ncoghlan at gmail.com> added the comment:

The 2.6 and 3.0 documentation has already been updated appropriately.
The forward compatible way to handle this is to inherit from object and
override the special methods explicitly in the 2.x version (Yes this can
make writing proxy objects more tedious, but from our experience with
the tempfile module, I would say that the bulk of proxy objects that
aren't overriding special methods on a case-by-case basis are probably
broken anyway).

It may be appropriate to add a -3 warning that is triggered whenever a
special method is retrieved via __getattr__ on a classic class.

____________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue643841>
____________________________________


More information about the Python-bugs-list mailing list