This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Mixin broken for new-style classes
Type: Stage:
Components: None Versions:
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: jjacob, rhettinger
Priority: normal Keywords:

Created on 2002-08-05 15:31 by jjacob, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Messages (2)
msg11823 - (view) Author: Joost Jacob (jjacob) Date: 2002-08-05 15:31
In article:
http://www.linuxjournal.com/article.php?sid=4540
Chuck Esterbrook mentions an elegant technique
called 'Mixin'.

Assigning to __bases__ is useful if you want to add
ancestors without changing the object's source code.

It does not work with new-style classes because the
 .__bases__ attribute is now read-only.
This is also mentioned on
http://www.python.org/2.2.1/bugs.html
at the bottom but I could not find a bug-report here at
SF.
msg11824 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2002-08-18 22:58
Logged In: YES 
user_id=80475

Merged this bug report into SF bug 593154.
Closing this one so the discussion can all be in one place.
History
Date User Action Args
2022-04-10 16:05:33adminsetgithub: 36981
2002-08-05 15:31:58jjacobcreate