getting name of passed reference

Joel Davis callmeclaudius at gmail.com
Mon Dec 28 18:54:04 EST 2009


I'm just curious if anyone knows of a way to get the variable name of
a reference passed to the function.

Put another way, in the example:

  def MyFunc ( varPassed ):
     print varPassed;

  MyFunc(nwVar)

how would I get the string "nwVar" from inside of "MyFunc"? is it
possible?



More information about the Python-list mailing list