Exheritance and Python

Martin v. Löwis loewis at informatik.hu-berlin.de
Fri Jun 14 12:05:27 CEST 2002

Jonne Itkonen <ji at tarzan.it.jyu.fi> writes:

> For new type classes, those that inherit object, this doesn't work,
> as __bases__ is read-only. Why? 

There is a technical problem: If changing the bases would change the
layout of instances (due to additional inherited slots, say), then
adding new bases is not implementable.

> So, is there a way to change the __bases__-attribute of a new type
> class? Am I to write a PEP?

In this specific case, I'd say a PEP won't help that much - write a
patch instead.


More information about the Python-list mailing list