Hi. Suppose I have: p = MyClass() I'm looking for a function that works like: func(p) = 'p' (meaning, retrieves the actual name of the variable). The best I could come up with is: def func(p): return globals().keys()[globals().values().index(p)] Surely there's a simpler way, something like the __name__ method in module objects.