Little Q: how to print a variable's name, not its value?

John J. Lee jjl at pobox.com
Fri Apr 1 14:56:28 EST 2005


"stewart.midwinter at gmail.com" <stewart.midwinter at gmail.com> writes:
[...]
> Restating:  I'm doing some debugging of some code.  I want to print out
> the value of two variables whose names are known.  Let's call them
> myTime and myPlace.
[...]

Why not simply get your editor to insert the variable name twice?  I
have that bound to C-c d in my .emacs.


John



More information about the Python-list mailing list