[issue31356] Add context manager to temporarily disable GC
Nick Coghlan
report at bugs.python.org
Sat Nov 11 01:04:55 EST 2017
Nick Coghlan <ncoghlan at gmail.com> added the comment:
Given the existing "gc.enable", "gc.disable" and "gc.isenabled" APIs, I'd suggest calling this one "gc.ensure_disabled": it ensures the GC is disabled in the with statement body, but only turns it back on at the end if it was previously enabled.
That same name would then be used all the way through the code and documentation.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31356>
_______________________________________
More information about the Python-bugs-list
mailing list