[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior
R. David Murray
report at bugs.python.org
Tue Oct 25 20:15:32 EDT 2016
R. David Murray added the comment:
Actually, the __enter__ method is looked up on the class, so saying "the __enter__ method of the instance" could be a bit confusing. Also, many context managers return self, so 'trivially' isn't really necessary as a modifier.
What if we added a sentence to the first paragraph that said "ExitStack instances return themselves when used in a with statement." Since that is immediately followed by an example of doing that, it seems like the best place to put it.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28516>
_______________________________________
More information about the Python-bugs-list
mailing list