I’d like to read an object method’s local value from a decorator that wraps it.
I’ve got access to the function and func_code from within the decorator but it seems all I can get out of it is the names of the local vars, but not their values.
Is it possible?
See https://stackoverflow.com/a/4249347/224295, http://code.activestate.com/recipes/577283-decorator-to-expose-local-variables-of-a-function-/
Working example: