This is the mail archive of the
mailing list for the Archer project.
Re: [python][rfc] Attempt to print the base class if a there is no Python pretty-printer for a derived class.
- From: Tom Tromey <tromey at redhat dot com>
- To: Pedro Alves <alves dot ped at gmail dot com>
- Cc: archer at sourceware dot org, Phil Muldoon <pmuldoon at redhat dot com>
- Date: Fri, 27 Mar 2009 11:50:39 -0600
- Subject: Re: [python][rfc] Attempt to print the base class if a there is no Python pretty-printer for a derived class.
- References: <49CD0730.firstname.lastname@example.org><email@example.com>
- Reply-to: Tom Tromey <tromey at redhat dot com>
>>>>> "Pedro" == Pedro Alves <firstname.lastname@example.org> writes:
Pedro> Does this do sensible things if class Y has some
Pedro> fields that mask the Base class's ones, when you only have a
Pedro> pretty printer for Base?
Yeah... it pretty-prints Base, then goes on to print the subclass
fields as usual (perhaps pretty-printing them as well).
Phil, could you post the before- and after- results of your example?
I think that would clear things up.
Pedro> What about private inheritance, sometimes used as an implementation
Pedro> detail, but not representing an is-a relationship?
This will also work; the code doesn't consider access flags.