Accessing 'mangled' class attrbutes

danmcleran at danmcleran at
Wed Mar 1 17:50:24 CET 2006

>>Is there any simple way round this situation in general?

It might be safer to use composition instead of inheritance in this
case. Assuming that XMLWriter has a write method to write what you
want, you could hold a reference to an XMLWriter within your class and
pass along write command like:

writer = XMLWriter()

More information about the Python-list mailing list