summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-10-15 22:03:32 (GMT)
committerGuido van Rossum <guido@python.org>2001-10-15 22:03:32 (GMT)
commit687ae00460da9cac04eb1ba8f6f5ab4db25fbfc2 (patch)
tree24a57c48ce1aa06744efacd21d635c581ef549fd /Misc
parent6642653875ff1b2f4bbe9c351c58cfa1c1abbede (diff)
downloadcpython-687ae00460da9cac04eb1ba8f6f5ab4db25fbfc2.zip
cpython-687ae00460da9cac04eb1ba8f6f5ab4db25fbfc2.tar.gz
cpython-687ae00460da9cac04eb1ba8f6f5ab4db25fbfc2.tar.bz2
Get rid of __defined__ and tp_defined -- there's no need to
distinguish __dict__ and __defined__ any more. In the C structure, tp_cache takes its place -- but this hasn't been implemented yet.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS17
1 files changed, 8 insertions, 9 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index b10f440..1e95283 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -4,15 +4,14 @@ Release date: 28-Sep-2100
Type/class unification and new-style classes
-- New-style classes are now dynamic by default. Previous, they were
- static (meaning class attributes could not be assigned to) and
- dynamic classes had to be requested by adding __dynamic__ = 1 to the
- body of the class or to the module. Static classes are faster than
- dynamic classes, but dynamic classes are now at most 50% slower than
- static classes; previously, they could be up to 10x slower. (This
- was accomplished by making dynamic classes faster, not by making
- static classes slower. :-) Note that according to one benchmark,
- static classes are about the same speed as classic classes.
+- New-style classes are now always dynamic (except for built-in and
+ extension types). There was no longer a performance penalty, and I
+ no longer see another reason to keep this baggage around. One relic
+ remains: the __dict__ or a new-style class is a read-only proxy.
+ You must set the class's attribute to modify. As a consequence, the
+ __defined__ attribute of new-style types no longer exists, for lack
+ of need: there is once again only one __dict__ (although in the
+ future a __cache__ may be resurrected in its place).
- C.__doc__ now works as expected for new-style classes (in 2.2a4 it
always returned None, even when there was a class docstring).