diff options
author | Guido van Rossum <guido@python.org> | 2001-12-03 15:46:59 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-12-03 15:46:59 (GMT) |
commit | cdbbd0a59dd9fa3db55c4d21defc495dfbdea0e4 (patch) | |
tree | 590af350cfb99d8aede51ba9e866d1d095993cf5 /Misc/NEWS | |
parent | 55c5abb52f6bcd0043da0db64ee002370106f1eb (diff) | |
download | cpython-cdbbd0a59dd9fa3db55c4d21defc495dfbdea0e4.zip cpython-cdbbd0a59dd9fa3db55c4d21defc495dfbdea0e4.tar.gz cpython-cdbbd0a59dd9fa3db55c4d21defc495dfbdea0e4.tar.bz2 |
New about super.
Diffstat (limited to 'Misc/NEWS')
-rw-r--r-- | Misc/NEWS | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -10,6 +10,21 @@ Type/class unification and new-style classes with finalizers. (The "get attribute" and "set attribute" methods are still called __get__ and __set__, respectively.) +- Some subtle issues with the super built-in were fixed: + + (a) When super itself is subclassed, its __get__ method would still + return an instance of the base class (i.e., of super). + + (b) super(C, C()).__class__ would return C rather than super. This + is confusing. To fix this, I decided to change the semantics of + super so that it only applies to code attributes, not to data + attributes. After all, overriding data attributes is not + supported anyway. + + (c) The __get__ method didn't check whether the argument was an + instance of the type used in creation of the super instance. + + Core and builtins Extension modules |