¡@

Home 

python Programming Glossary: imagezip

Python dynamic inheritance: How to choose base class upon instance creation?

http://stackoverflow.com/questions/7057019/python-dynamic-inheritance-how-to-choose-base-class-upon-instance-creation

try to create an instance of the concrete image class ImageZIP when it is given a gz file. Exactly in the same way it would.. create an instance of ImageJPG when given a jpg file. The ImageZIP class just wants to redefine the file_obj property. In no case.. on what file format is hiding inside the zip archive the ImageZIP classes needs to inherit either from ImageJPG or from ImagePNG..