getting an object name

Christos TZOTZIOY Georgiou tzot at
Wed Jun 22 14:02:15 CEST 2005

On Wed, 22 Jun 2005 09:00:23 +0100, rumours say that Simon Brunning
<simon.brunning at> might have written:

>> Let's say I have a list called, alist. If I pass alist to a function,
>> how can I get the name of it?
>The effbot put it beautifully:

And IMO it should be in the FAQ:

"How do I get the name of an object?"

>"The same way as you get the name of that cat you found on your porch:
>the cat (object) itself cannot tell you its name, and it doesn't
>really care -- so the only way to find out what it's called is to ask
>all your neighbours (namespaces) if it's their cat (object) ... and
>don't be surprised if you'll find that it's known by many names, or no
>name at all!"

Whom should we bug to add it?
TZOTZIOY, I speak England very best.
"Be strict when sending and tolerant when receiving." (from RFC1958)
I really should keep that in mind when talking with people, actually...

More information about the Python-list mailing list