Message207472
"magic methods" like __enter__ and __exit__ are only looked up on the class, not on the instance. This is by design.
In some older versions of Python some specific methods (and I think __enter__ and __exit__ were among them for a time) were looked up on the instances, but this was a bug.
(Personally I think it would be nice if they were looked up on the instances, but there are good reasons why this is not done.) |
|
Date |
User |
Action |
Args |
2014-01-06 19:44:25 | r.david.murray | set | recipients:
+ r.david.murray, dewin |
2014-01-06 19:44:25 | r.david.murray | set | messageid: <1389037465.59.0.681978660042.issue20149@psf.upfronthosting.co.za> |
2014-01-06 19:44:25 | r.david.murray | link | issue20149 messages |
2014-01-06 19:44:25 | r.david.murray | create | |
|