]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
This is not part of my patch
authorMichael W. Hudson <mwh@python.net>
Tue, 26 Nov 2002 14:48:23 +0000 (14:48 +0000)
committerMichael W. Hudson <mwh@python.net>
Tue, 26 Nov 2002 14:48:23 +0000 (14:48 +0000)
[ 635933 ] make some type attrs writable

but should have been!

News about the above.

Doc/whatsnew/whatsnew23.tex
Misc/NEWS

index b1e97139da306874c0e59044737a52a0488e275b..c3b8e8fa04c9812edaeb337ce9b9209b17fbfdb7 100644 (file)
@@ -896,6 +896,13 @@ In 2.3, you get this:
 <type '_socket.socket'>
 \end{verbatim}
 
+\item One of the noted incompatibilities between old- and new-style
+  classes has been removed: you can now assign to the
+  \member{__name__} and \member{__bases__} attributes of new-style
+  classes.  There are some restrictions on what can be assigned to
+  \member{__bases__} along the lines of those relating to assigning to
+  an instance's \member{__class__} attribute.
+
 \end{itemize}
 
 
index 4b3879481e416d209d85804ad5d5b115e8105501..a5190c74d6b6c129e723a8ae4bb13d63fc5ae5c0 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,8 @@ What's New in Python 2.3 alpha 1?
 Type/class unification and new-style classes
 --------------------------------------------
 
+- One can now assign to __bases__ and __name__ of new-style classes.
+
 - dict() now accepts keyword arguments so that dict(one=1, two=2)
   is the equivalent of {"one": 1, "two": 2}.  Accordingly,
   the existing (but undocumented) 'items' keyword argument has