Is there a builtin way of making making another instance of your own
class? I really expected type(self)(*arg s, **keywords) to work this way.
Currently i'm doing this:
def new(self,*args, **keywords):
from new import instance
s=instance(self .__class__)
if hasattr(D(),'__ init__'):
s.__init__(*arg s,**keywords)
return s
--
"You have to impress him! Be independent and plucky, but often do
things that are moronic and out of character!"
--50s Diana Dane to 90s Diana Dane
class? I really expected type(self)(*arg s, **keywords) to work this way.
Currently i'm doing this:
def new(self,*args, **keywords):
from new import instance
s=instance(self .__class__)
if hasattr(D(),'__ init__'):
s.__init__(*arg s,**keywords)
return s
--
"You have to impress him! Be independent and plucky, but often do
things that are moronic and out of character!"
--50s Diana Dane to 90s Diana Dane
Comment