Message136640
> hasattr(transaction, '__exit__')
http://docs.python.org/dev/reference/datamodel#special-method-names explains that magic methods are looked up on the class, not on the instances. There’s a lot of code out there that erroneously checks for __len__ or __call__ on instances, and this is the second time to my knowledge that a project abused a module-level __enter__ function. |
|
Date |
User |
Action |
Args |
2011-05-23 14:09:45 | eric.araujo | set | recipients:
+ eric.araujo, benjamin.peterson, daniel.urban, dholth |
2011-05-23 14:09:45 | eric.araujo | set | messageid: <1306159785.5.0.952118645579.issue12022@psf.upfronthosting.co.za> |
2011-05-23 14:09:44 | eric.araujo | link | issue12022 messages |
2011-05-23 14:09:44 | eric.araujo | create | |
|