Hi all, quick one,
I hope I am explaining this properly, I am wanting to do some introspection
on custom object instances, for example:
import md5[color=blue][color=green][color=darkred]
>>> m = md5.new()
>>> type(m)[/color][/color][/color]
<type 'md5.md5'>
I can at least test here by doing something like if type(m) == 'md5.md5':
Here is a custom Dispatcher class that I have written
[color=blue][color=green][color=darkred]
>>> from BI.System.Contr oller.Dispatche r import Dispatcher
>>> x = Dispatcher()
>>> type(x)[/color][/color][/color]
<type 'instance'>
How do I get the same as with instance 'm' above where the type displays the
actual object instance name, however my
custom dispatcher instance is just a generic 'instance', is there some
builtin where this is set ?
many thanks
Graeme
I hope I am explaining this properly, I am wanting to do some introspection
on custom object instances, for example:
import md5[color=blue][color=green][color=darkred]
>>> m = md5.new()
>>> type(m)[/color][/color][/color]
<type 'md5.md5'>
I can at least test here by doing something like if type(m) == 'md5.md5':
Here is a custom Dispatcher class that I have written
[color=blue][color=green][color=darkred]
>>> from BI.System.Contr oller.Dispatche r import Dispatcher
>>> x = Dispatcher()
>>> type(x)[/color][/color][/color]
<type 'instance'>
How do I get the same as with instance 'm' above where the type displays the
actual object instance name, however my
custom dispatcher instance is just a generic 'instance', is there some
builtin where this is set ?
many thanks
Graeme
Comment