No doubt I've overlooked something obvious, but here goes: Let's say I assign a value to a var, e.g.: myPlace = 'right here' myTime = 'right now'
Now let's say I want to print out the two vars, along with their names. I could easily do this: print "myPlace = %s, myTime = %s" % (myPlace, myTime) But that requires that I know in advance the name of the vars. What if they are assigned dynamically. What I'm looking for is some method ( call it f() ) that allows me to do this: print "%s = %s, %s = %s" % (f(myPlace), myPlace, f(myTime), myTime) Any ideas? repr() doesn't do it for me, nor ``. thanks Stewart in Calgary -- http://mail.python.org/mailman/listinfo/python-list