On 11/21/2013 06:02 PM, Dave Angel wrote:
Catherine Moroney wrote:

If I have a class that has some member functions, and all the
functions define a local variable of the same name (but
different type), is there some way to use getattr/setattr to
access the local variables specific to a given function?

If you mean to access them from within the same method, someone
else has already shown it using locals(). But you cannot access
 locals from a method that's already terminated. They no longer exist.

Also, accessing is fine, but not all pythons support changing them.

--
~Ethan~
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to