Inheritance doesn't work

Fredrik Lundh fredrik at pythonware.com
Mon Dec 4 05:23:24 EST 2006


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 create new 
images, use the Image.new() factory.

</F>




More information about the Python-list mailing list