[issue13585] Add contextlib.ExitStack

Jeroen Demeyer report at bugs.python.org
Wed Apr 11 16:33:52 EDT 2018


Jeroen Demeyer <J.Demeyer at UGent.be> added the comment:

Why this?

_exit_wrapper.__self__ = cm

It seems that you are trying to create something which is exactly like a method except that it's not a method. Is there any reason to not use an actual method? It would actually simplify the code.

I ask because assigning __self__ might break after PEP 575.

----------
nosy: +jdemeyer

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue13585>
_______________________________________


More information about the Python-bugs-list mailing list