summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-08-31 18:31:35 (GMT)
committerGuido van Rossum <guido@python.org>2001-08-31 18:31:35 (GMT)
commitae45714ed311aed22eb80336b67055483c28267f (patch)
treea7396c599cfb8ca59de7338f020bb7509f436cf0 /Misc
parent97741a30414c41e314950844bebee3230e9d813d (diff)
downloadcpython-ae45714ed311aed22eb80336b67055483c28267f.zip
cpython-ae45714ed311aed22eb80336b67055483c28267f.tar.gz
cpython-ae45714ed311aed22eb80336b67055483c28267f.tar.bz2
Add various and sundry news items -- most mine, one Barry's, one
Michael Hudson's.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS44
1 files changed, 44 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 685d685..68aef95 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -3,6 +3,43 @@ What's New in Python 2.2a3?
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
legal that were SyntaxErrors before:
@@ -22,6 +59,9 @@ Library
When read on a box where Python ints are 4 bytes, such values are
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
Build
@@ -44,6 +84,10 @@ API
- 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