[Python-checkins] CVS: python/dist/src/Misc NEWS,1.323,1.324

Guido van Rossum gvanrossum@users.sourceforge.net
Mon, 03 Dec 2001 07:47:02 -0800


Update of /cvsroot/python/python/dist/src/Misc
In directory usw-pr-cvs1:/tmp/cvs-serv11421

Modified Files:
	NEWS 
Log Message:
New about super.


Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.323
retrieving revision 1.324
diff -C2 -d -r1.323 -r1.324
*** NEWS	2001/12/03 00:54:52	1.323
--- NEWS	2001/12/03 15:46:59	1.324
***************
*** 11,14 ****
--- 11,29 ----
    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