[Python-ideas] Proposed additions to inspect module for function and generator state introspection
Jan Kaliszewski
zuo at chopin.edu.pl
Fri Sep 30 23:21:57 CEST 2011
Nick Coghlan dixit (2011-09-29, 13:44):
> Based on the testability comments in the closure threads, I created
> http://bugs.python.org/issue13062 to propose two new introspection
> functions:
>
> inspect.getclosure(func)
> Returns a dictionary mapping closure references from the supplied
> function to their current values.
>
> inspect.getgeneratorlocals(generator)
> Returns the same result as would be reported by calling locals()
> in the generator's frame of execution
The only thing I can type in here is
+1
Cheers.
*j
More information about the Python-ideas
mailing list