Find out the name of a variable passed as an argument

Fredrik Lundh fredrik at pythonware.com
Wed Oct 4 21:31:45 CEST 2006


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

</F>




More information about the Python-list mailing list