mwh at python.net
Fri Mar 14 11:45:46 CET 2003
username <username at ilt.fhg.de> writes:
> I need something (<<code>>) for a class i.e.
> class Hello:
> def get_class_name(self):
> that does this
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
....and don't be surprised if you'll find that it's known by many
names, or no name at all!
-- Fredrik Lundh, 3 Nov 2000
i.e. you don't do that.
Arrrrgh, the braindamage! It's not unlike the massively
non-brilliant decision to use the period in abbreviations
as well as a sentence terminator. Had these people no
imagination at _all_? -- Erik Naggum, comp.lang.lisp
More information about the Python-list