Brett Cannon added the comment:

In issue #25637, Guido said he didn't want to move stuff out of 
collections.abc, so the context manager ABC will go into contextlib.

To answer Martin's point, I could make __exit__ abstract to begin with to make 
people override it properly. The only reason I thought of providing a default 
implementation is that it inherently isn't required to be implemented to match 
the context manager interface/protocol. But as you pointed out, the usefulness 
of a context manager is derived from doing stuff in __exit__(), so I will make 
it abstract.

----------
dependencies: +Move non-collections-related ABCs out of collections.abc

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25609>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to