[Python-Dev] assigning to new-style-class.__name__

Samuele Pedroni pedronis@bluewin.ch
Wed, 27 Nov 2002 14:22:45 +0100


From: "Michael Hudson" <mwh@python.net>
To: <python-dev@python.org>
Sent: Wednesday, November 27, 2002 2:20 PM
Subject: Re: [Python-Dev] assigning to new-style-class.__name__


> Michael Hudson <mwh@python.net> writes:
>
> > "Samuele Pedroni" <pedronis@bluewin.ch> writes:
> >
> > > I haven't looked at the code, but if it checks directly for the
consistency of
> > > E's mro when you change C's bases, then there is no way to move from a
> > > hierarchy where A precedes B in the mros to one where the two are
swapped,
>
> Yes there is!  With A thru E as in my previous mail:
>
> C.__bases__ = (A,)
>
> D.__bases__ = (B, A)
>
> C.__bases__ = (B, A)
>
> Now there are situations where this can probably cause difficulties,
> but that's always going to be possible...

what about solid bases? e.g. B is list and A  simply a subclass of object.

regards.