Re: coloring a complex number

2005-10-21 Thread Bengt Richter
On Fri, 21 Oct 2005 20:55:47 -0500, Brandon K <[EMAIL PROTECTED]> wrote: >I'm not 100% sure about this, but from what it seems like, the reason >method B worked, and not method a is because class foo(complex) is >subclassing a metaclass. So if you do this, you can't init a meta class >(try typ

Re: coloring a complex number

2005-10-21 Thread Kent Johnson
Arthur wrote: > Spending the morning avoiding responsibilities, and seeing what it would > take to color some complex numbers. > > class color_complex(complex): > def __init__(self,*args,**kws): > complex.__init__(*args) > self.color=kws.get('color', 'BLUE'

Re: coloring a complex number

2005-10-21 Thread Brandon K
I'm not 100% sure about this, but from what it seems like, the reason method B worked, and not method a is because class foo(complex) is subclassing a metaclass. So if you do this, you can't init a meta class (try type(complex), it equals 'type' not 'complex'. type(complex()) yields 'complex'

coloring a complex number

2005-10-21 Thread Arthur
Spending the morning avoiding responsibilities, and seeing what it would take to color some complex numbers. class color_complex(complex): def __init__(self,*args,**kws): complex.__init__(*args) self.color=kws.get('color', 'BLUE') >>> a=color_complex(1,