samwyse wrote:
 > NewStyle.__name__ = old.__class__.__name__

Simple, but that does the trick!

 > new.__dict__ = old.__dict__.copy()

Unfortunately, that does not work, since the attributes are not 
writeable and thus do not appear in __dict__.

But my __getattr__ solution does not work either, since the attributes 
are set to None when initialized, so __getattr__ is never called.

Need to think about this point some more...

Anyway, the beer is on me ;-)

-- Chris
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to