Thread Previous • Date Previous • Date Next • Thread Next |
Other possibility, perhaps THE python way: isinstance(s.shape,Sphere)
Ok, seems it is best way. Thanks!
You can run this to have .name back BTW: Serializable.name=property(lambda self:self.__class__.__name__) Sphere().name # 'Sphere'
-- Best regards, Sergei D.
Thread Previous • Date Previous • Date Next • Thread Next |