How to give a custom object instance a type name ?

Michael Hudson mwh at python.net
Tue Jul 15 17:57:44 CEST 2003


"Graeme Matthew" <gsmatthew at ozemail.com.au> writes:

> works fine, ta
> 
> x.__class__.__name__
> 'Dispatcher'
> >>>

You could also use new-style classes, btw.

Cheers,
M.

-- 
  Windows installation day one.  Getting rid of the old windows 
  was easy - they fell apart quite happily, and certainly wont 
  be re-installable anywhere else.   -- http://www.linux.org.uk/diary/
                                       (not *that* sort of windows...)




More information about the Python-list mailing list