Éric Araujo <mer...@netwok.org> added the comment:

Thank you for the report. Unfortunately, the 2.6 behavior was a bug, as I 
explained on #9220: Magic methods are looked up on the object’s class, not in 
the object’s __dict__. <http://docs.python.org/reference/datamodel#specialnames>

(Your test with class methods was a clever idea, but a class is a type 
instance, so it’s the same behavior: __enter__ is looked up on type, not on the 
class. Nice try :)

Tip for future bug reports: We prefer regular files over archives. Thanks again!

----------
nosy: +merwok

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9259>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to