Xiang Zhang added the comment: This seems to be designed. From PEP343 it tells clearly:
If either of the relevant methods are not found as expected, the interpreter will raise AttributeError, in the order that they are tried (__exit__, __enter__). But currently I don't find out why. ---------- nosy: +xiang.zhang _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27100> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com