[Python-checkins] commit of r41587 - python/trunk/Doc/ref/ref3.tex

andrew.kuchling python-checkins at python.org
Sun Dec 4 17:07:20 CET 2005


Author: andrew.kuchling
Date: Sun Dec  4 17:07:15 2005
New Revision: 41587

Modified:
   python/trunk/Doc/ref/ref3.tex
Log:
Add placeholder section on old and new-style classes

Modified: python/trunk/Doc/ref/ref3.tex
==============================================================================
--- python/trunk/Doc/ref/ref3.tex	(original)
+++ python/trunk/Doc/ref/ref3.tex	Sun Dec  4 17:07:15 2005
@@ -1031,7 +1031,20 @@
 
 \end{description} % Types
 
+%=========================================================================
+\section{New-style and classic classes}
 
+Classes and instances come in two flavours: old-style or classic, and new-style.  
+
+Old-style classes were the only flavour of class available before Python 2.1.  While they supported multiple inheritance, the rules for resolving names were chosen for ease of implementation.  These rules turn out to make multiple inheritance hard to use in certain situations.
+
+New-style classes were introduced in Python 2.1, and change the method resolution order to make multiple inheritance more usable.  
+
+The plan is to eventually drop old-style classes, leaving only the semantics of new-style classes.  This change will probably only be feasible in Python 3.0.
+
+
+
+%=========================================================================
 \section{Special method names\label{specialnames}}
 
 A class can implement certain operations that are invoked by special


More information about the Python-checkins mailing list