mirror of
https://github.com/python/cpython.git
synced 2025-11-26 21:33:10 +00:00
This is not part of my patch
[ 635933 ] make some type attrs writable but should have been! News about the above.
This commit is contained in:
parent
98bbc49c54
commit
96bc3b4d74
2 changed files with 9 additions and 0 deletions
|
|
@ -896,6 +896,13 @@ In 2.3, you get this:
|
||||||
<type '_socket.socket'>
|
<type '_socket.socket'>
|
||||||
\end{verbatim}
|
\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}
|
\end{itemize}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,8 @@ What's New in Python 2.3 alpha 1?
|
||||||
Type/class unification and new-style classes
|
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)
|
- dict() now accepts keyword arguments so that dict(one=1, two=2)
|
||||||
is the equivalent of {"one": 1, "two": 2}. Accordingly,
|
is the equivalent of {"one": 1, "two": 2}. Accordingly,
|
||||||
the existing (but undocumented) 'items' keyword argument has
|
the existing (but undocumented) 'items' keyword argument has
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue