[Python-checkins] CVS: python/dist/src/Misc NEWS,1.219,1.220

Guido van Rossum gvanrossum@users.sourceforge.net
Fri, 31 Aug 2001 11:31:37 -0700


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

Modified Files:
	NEWS 
Log Message:
Add various and sundry news items -- most mine, one Barry's, one
Michael Hudson's.


Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.219
retrieving revision 1.220
diff -C2 -d -r1.219 -r1.220
*** NEWS	2001/08/30 20:51:59	1.219
--- NEWS	2001/08/31 18:31:35	1.220
***************
*** 4,7 ****
--- 4,44 ----
  Core
  
+ + Overflowing operations on plain ints now return a long int rather
+   than raising OverflowError.  This is a partial implementation of PEP
+   237.  You can use -Wdefault::OverflowWarning to enable a warning for
+   this situation, and -Werror::OverflowWarning to revert to the old
+   OverflowError exception.
+ 
+ + A new command line option, -D<arg>, is added to control run-time
+   warnings for the use of classic division.  (See PEP 238.)  Possible
+   values are -Dold, -Dwarn, and -Dnew.  The default is -Dold, meaning
+   the / operator has its classic meaning and no warnings are issued.
+   Using -Dwarn issues a run-time warning about all uses of classic
+   division for int, long, float and complex arguments.  Using -Dnew is
+   questionable; it turns on new division by default, but only in the
+   __main__ module.  You can usefully combine -Dwarn and -Dnew: this
+   gives the __main__ module new division, and warns about classic
+   division everywhere else.
+ 
+ + Many built-in types can now be subclassed.  This applies to int,
+   long, float, str, unicode, and tuple.  (The types complex, list and
+   dictionary can also be subclassed; this was introduced earlier.)
+   Note that restrictions apply when subclassing immutable built-in
+   types: you can only affect the value of the instance by overloading
+   __new__.  You can add mutable attributes, and the subclass instances
+   will have a __dict__ attribute, but you cannot change the "value"
+   (as implemented by the base class) of an immutable subclass instance
+   once it is created.
+ 
+ + A new built-in type, super, has been added.  This facilitates making
+   "cooperative super calls" in a multiple inheritance setting.  For an
+   explanation, see http://www.python.org/2.2/descrintro.html#cooperation
+ 
+ + A new built-in type, getset, has been added.  This enables the
+   creation of "computed attributes".  Such attributes are implemented
+   by getter and setter functions (or only one of these for read-only
+   or write-only attributes), without the need to override
+   __getattr__.  See http://www.python.org/2.2/descrintro.html#getset
+ 
  + The syntax of floating-point and imaginary literals has been
    liberalized, to allow leading zeroes.  Examples of literals now
***************
*** 23,26 ****
--- 60,66 ----
    converted to Python longs.
  
+ + In restricted execution mode (using the rexec module), unmarshalling
+   code objects is no longer allowed.  This plugs a security hole.
+ 
  Tools
  
***************
*** 45,48 ****
--- 85,92 ----
      - remove calls to PyObject_AS_GC and PyObject_FROM_GC
  
+ + Two new functions: PyString_FromFormat() and PyString_FromFormatV().
+   These can be used safely to construct string objects from a
+   sprintf-style format string (similar to the format string supported
+   by PyErr_Format()).
  
  New platforms