How to give a custom object instance a type name ?

Ulrich Petri ulope at
Mon Jul 14 14:22:01 CEST 2003

"Graeme Matthew" <gsmatthew at> schrieb im Newsbeitrag
news:DAwQa.168$O05.9536 at
> Here is a custom Dispatcher class that I have written
> >>> from BI.System.Controller.Dispatcher import Dispatcher
> >>> x = Dispatcher()
> >>> type(x)
> <type 'instance'>

You did Java before ;)?

> How do I get the same as with instance 'm' above where the type displays
> actual object instance name, however my
> custom dispatcher instance is just a generic 'instance', is there some
> builtin where this is set ?

how about
>>> x.__class__.__name__

Ciao Ulrich

More information about the Python-list mailing list