Re: Inheritance doesn't work

2006-12-12 Thread Fredrik Lundh
John Salerno wrote: > Well, I can't say I was surprised, but my main (subtle, understated, > sneaky) point was how do you expect anyone to help you when you aren't > even giving us the proper information that produces the error? I've stopped trying to make that point; I just apply a basic error c

Re: Inheritance doesn't work

2006-12-07 Thread John Salerno
Fredrik Lundh wrote: > J. Clifford Dyer wrote: > >> Sure, but I think the question was more about how code that references >> "MandelbrotImage could yield a stack that references MandelImage. > > well, it's been obvious for quite some time that we've now reached a > point in Python's quest for w

Re: Inheritance doesn't work

2006-12-04 Thread Fredrik Lundh
J. Clifford Dyer wrote: > Sure, but I think the question was more about how code that references > "MandelbrotImage could yield a stack that references MandelImage. well, it's been obvious for quite some time that we've now reached a point in Python's quest for world domination where newbies sta

Re: Inheritance doesn't work

2006-12-04 Thread John Salerno
J. Clifford Dyer wrote: > Sure, but I think the question was more about how code that references > "MandelbrotImage could yield a stack that references MandelImage. Yeah, I guess I could have been more specific. :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Inheritance doesn't work

2006-12-04 Thread J. Clifford Dyer
Fredrik Lundh wrote: > John Salerno wrote: > >> How do you get that error with that code? > > $ python > import os class foo(os): > pass > > Traceback (most recent call last): > File "", line 1, in > TypeError: Error when calling the metaclass bases > module.__init

Re: Inheritance doesn't work

2006-12-04 Thread Fredrik Lundh
John Salerno wrote: > How do you get that error with that code? $ python >>> import os >>> class foo(os): ... pass ... Traceback (most recent call last): File "", line 1, in TypeError: Error when calling the metaclass bases module.__init__() takes at most 2 arguments (3 given)

Re: Inheritance doesn't work

2006-12-04 Thread John Salerno
zefciu wrote: > class MandelbrotImage (Image): > pass > I am getting the following error: > File "mandelimage.py", line 3, in ? > class MandelImage (Image): How do you get that error with that code? -- http://mail.python.org/mailman/listinfo/python-list

Re: Inheritance doesn't work

2006-12-04 Thread Michael S
How about calling base class __init__ and then the pass statement? --- zefciu <[EMAIL PROTECTED]> wrote: > I have a problem with inheritance under python. The > class definition is > longer, but the troublesome thing is: > > from PIL import Image > class MandelbrotImage (Image): > pass

Re: Inheritance doesn't work

2006-12-04 Thread Fredrik Lundh
zefciu wrote: > I have a problem with inheritance under python. The class definition is > longer, but the troublesome thing is: > > from PIL import Image that's a module, not a class. > class MandelbrotImage (Image): > pass PIL's Image class isn't designed to be inherited from. to cr

Re: Inheritance doesn't work

2006-12-04 Thread Robert Kern
zefciu wrote: > I have a problem with inheritance under python. The class definition is > longer, but the troublesome thing is: > > from PIL import Image > class MandelbrotImage (Image): > pass > > I am getting the following error: > Traceback (most recent call last): >File "", line

Inheritance doesn't work

2006-12-04 Thread zefciu
I have a problem with inheritance under python. The class definition is longer, but the troublesome thing is: from PIL import Image class MandelbrotImage (Image): pass I am getting the following error: Traceback (most recent call last): File "", line 1, in ? File "mandelimage.py