Re: Find out the name of a variable passed as an argument

2006-10-04 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Fredrik Lundh <[EMAIL PROTECTED]> wrote: >Andreas Huesgen wrote: > >> is there a way to receive the name of an object passed to a function >> from within the function. > >objects don't have names, so in general, you cannot do that. see: > >http://pyfaq.infogami.co

Re: Find out the name of a variable passed as an argument

2006-10-04 Thread John Henry
Algol, anyone? Andreas Huesgen wrote: > Hello everybody, > > is there a way to receive the name of an object passed to a function > from within the function. > > something like > > def foo(param): > print theNameOfTheVariablePassedToParam > > var1 = "hello" > var2 = "world" > > >>> foo(var

Re: Find out the name of a variable passed as an argument

2006-10-04 Thread Fredrik Lundh
Andreas Huesgen wrote: > is there a way to receive the name of an object passed to a function > from within the function. objects don't have names, so in general, you cannot do that. see: http://pyfaq.infogami.com/how-can-my-code-discover-the-name-of-an-object -- http://mail.python.org/mai