Find out the name of a variable passed as an argument

Cameron Laird claird at lairds.us
Wed Oct 4 16:30:05 EDT 2006


In article <mailman.1288.1159990437.10491.python-list at python.org>,
Fredrik Lundh  <fredrik at pythonware.com> 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.com/how-can-my-code-discover-the-name-of-an-object
			.
			.
			.
Note, though, the slight miscalibration of the Python Time Machine, for
<URL: http://groups.google.com/group/comp.lang.python/msg/696a89b0b4e085b3 >
(see the top of the content) appeared about eighteen hours before Mr. Huesgen
asked his question.



More information about the Python-list mailing list