[issue25609] Add a ContextManager ABC and type

Brett Cannon report at bugs.python.org
Mon Apr 4 18:02:25 EDT 2016


Brett Cannon added the comment:

When I have a chance I'll do up a new patch where the definition of typing.ContextManager is guarded, add a What's New entry, and commit it. My planned guard will be:

if hasattr(contextlib, 'AbstractContextManager'):
    class ContextManager(...): ...
    __all__.append('ContextManager')

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25609>
_______________________________________


More information about the Python-bugs-list mailing list