Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 96bc3b4

Browse files
author
Michael W. Hudson
committed
This is not part of my patch
[ 635933 ] make some type attrs writable but should have been! News about the above.
1 parent 98bbc49 commit 96bc3b4

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

Doc/whatsnew/whatsnew23.tex

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -896,6 +896,13 @@ \section{Other Language Changes}
896896
<type '_socket.socket'>
897897
\end{verbatim}
898898

899+
\item One of the noted incompatibilities between old- and new-style
900+
classes has been removed: you can now assign to the
901+
\member{__name__} and \member{__bases__} attributes of new-style
902+
classes. There are some restrictions on what can be assigned to
903+
\member{__bases__} along the lines of those relating to assigning to
904+
an instance's \member{__class__} attribute.
905+
899906
\end{itemize}
900907

901908

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ What's New in Python 2.3 alpha 1?
1212
Type/class unification and new-style classes
1313
--------------------------------------------
1414

15+
- One can now assign to __bases__ and __name__ of new-style classes.
16+
1517
- dict() now accepts keyword arguments so that dict(one=1, two=2)
1618
is the equivalent of {"one": 1, "two": 2}. Accordingly,
1719
the existing (but undocumented) 'items' keyword argument has

0 commit comments

Comments
 (0)