Benjamin Peterson added the comment: This is a property of all special methods not just __enter__ and __exit__. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue17268> _______________________________________