Re: using getattr/setattr for local variables in a member function

2013-11-21 Thread Gregory Ewing
Catherine M Moroney wrote: is there some way to use getattr/setattr to access the local variables specific to a given function? No, because those variables don't even exist when there isn't a call to the function in progress. Your example suggests that, instead of local variables, you really

Re: using getattr/setattr for local variables in a member function

2013-11-21 Thread Ethan Furman
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 fu

Re: using getattr/setattr for local variables in a member function

2013-11-21 Thread Dave Angel
On Fri, 22 Nov 2013 00:52:21 +, MRAB 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

Re: using getattr/setattr for local variables in a member function

2013-11-21 Thread Ned Batchelder
On Thursday, November 21, 2013 6:12:10 PM UTC-5, Catherine M Moroney wrote: > Hello, > > 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 variable

Re: using getattr/setattr for local variables in a member function

2013-11-21 Thread MRAB
On 21/11/2013 23:12, Catherine M Moroney wrote: Hello, 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? Obvi

using getattr/setattr for local variables in a member function

2013-11-21 Thread Catherine M Moroney
Hello, 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? Obviously there's no need to do this for the small