in my project I have to repeat often such part of code:
class SimplePhysicObject(Object):
def __init__(self):
super(Object, self).__init__('SimplePhysicObject')
But instead of SimplePhysicObject
there is new string each time. Are there any ways to write some macro to make this work easier? Something like:
DoTemplate(NewObject)
==>
class NewObject(Object):
def __init__(self):
super(Object, self).__init__('NewObject')
UPD Sorry, Object
is my own class declared before in code