[issue13062] Introspection generator and function closure state
Nick Coghlan
report at bugs.python.org
Thu Sep 29 23:18:51 CEST 2011
Nick Coghlan <ncoghlan at gmail.com> added the comment:
Huh, I didn't actually realise getclosure() could be written as a one liner until seeing Meador's version above:
{var : cell.cell_contents for var, cell in zip(func.__code__.co_freevars, func.__closure__)}
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13062>
_______________________________________
More information about the Python-bugs-list
mailing list