summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-02-02 10:30:18 (GMT)
committerGeorg Brandl <georg@python.org>2008-02-02 10:30:18 (GMT)
commit396ef80f0d65a484180b649c4bb004f8a025d07e (patch)
tree1128f44e58d4e277843efbd7a3a87418c0113299 /Doc
parent86173daf8d7a4d69a7109bac1d658d2368dddee3 (diff)
downloadcpython-396ef80f0d65a484180b649c4bb004f8a025d07e.zip
cpython-396ef80f0d65a484180b649c4bb004f8a025d07e.tar.gz
cpython-396ef80f0d65a484180b649c4bb004f8a025d07e.tar.bz2
Some new 3.0 whatsnew items, written for GHOP by Andreas Freund.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/whatsnew/3.0.rst71
1 files changed, 66 insertions, 5 deletions
diff --git a/Doc/whatsnew/3.0.rst b/Doc/whatsnew/3.0.rst
index 6026a0f..859c64b 100644
--- a/Doc/whatsnew/3.0.rst
+++ b/Doc/whatsnew/3.0.rst
@@ -182,19 +182,31 @@ Strings and Bytes
PEP 3101: A New Approach to String Formatting
=============================================
-XXX
+.. XXX expand this
+* A new system for built-in string formatting operations replaces
+ the ``%`` string formatting operator.
-PEP 3106: Revamping ``.keys()``, ``.items()`` and ``.values()``
-===============================================================
-XXX
+PEP 3106: Revamping dict ``.keys()``, ``.items()`` and ``.values()``
+====================================================================
+
+.. XXX expand this
+
+* The ``.iterkeys()``, ``.itervalues()`` and ``.iteritems()`` methods
+ have been removed.
+
+* ``.keys()``, ``.values()`` and ``.items()`` return objects with set
+ behavior that reference the underlying dict.
PEP 3107: Function Annotations
==============================
-XXX
+.. XXX expand this
+
+* A standardized way of annotating a function's parameters and return
+ values.
Exception Stuff
@@ -216,6 +228,11 @@ Exception Stuff
* PEP 3134: Exception chaining. (The ``__context__`` feature from the
PEP hasn't been implemented yet in 3.0a1.)
+* A few exception messages are improved when Windows fails to load an
+ extension module. For example, ``error code 193`` is now ``%1 is not
+ a valid Win32 application``. Strings now deal with non-English
+ locales.
+
New Class and Metaclass Stuff
=============================
@@ -242,8 +259,13 @@ language and built-in functions.
* Removed ``<>`` (use ``!=`` instead).
+* ``!=`` now returns the opposite of ``==``, unless ``==`` returns
+ ``NotImplemented``.
+
* ``as`` and ``with`` are keywords.
+* ``True``, ``False``, and ``None`` are keywords.
+
* PEP 237: ``long`` renamed to ``int``. That is, there is only one
built-in integral type, named ``int``; but it behaves like the old
``long`` type, with the exception that the literal suffix ``L`` is
@@ -312,6 +334,23 @@ language and built-in functions.
* ``exec`` is now a function.
+* There is a new free format floating point representation, which is
+ based on "Floating-Point Printer Sample Code", by Robert G. Burger.
+ ``repr(11./5)`` now returns ``2.2`` instead of ``2.2000000000000002``.
+
+* The ``__oct__()`` and ``__hex__()`` special methods are removed --
+ ``oct()`` and ``hex()`` use ``__index__()`` now to convert the
+ argument to an integer.
+
+* There is now a ``bin()`` builtin function.
+
+* Support is removed for ``__members__`` and ``__methods__``.
+
+* ``nb_nonzero`` is now ``nb_bool`` and ``__nonzero__`` is now
+ ``__bool__``.
+
+* Removed ``sys.maxint``. Use ``sys.maxsize``.
+
.. ======================================================================
@@ -341,6 +380,18 @@ through the Subversion logs for all the details.
* The ``cPickle`` module is gone. Use ``pickle`` instead. Eventually
we'll have a transparent accelerator module.
+* The ``imageop`` module is gone.
+
+* The ``audiodev``, ``Bastion``, ``bsddb185``, ``exceptions``,
+ ``linuxaudiodev``, ``md5``, ``MimeWriter``, ``mimify``, ``popen2``,
+ ``rexec``, ``sets``, ``sha``, ``stringold``, ``strop``, ``sunaudiodev``,
+ ``timing``, and ``xmllib`` modules are gone.
+
+* The ``new`` module is gone.
+
+* The methods ``os.tmpnam()``, ``os.tempnam()`` and ``os.tmpfile()`` have
+ been removed in favor of the ``tempfile`` module.
+
.. ======================================================================
.. whole new modules get described in subsections here
@@ -358,6 +409,15 @@ Changes to Python's build process and to the C API include:
* PEP 3123: Making ``PyObject_HEAD`` conform to standard C.
+* No more C API support for restricted execution.
+
+* ``PyNumber_Coerce()``, ``PyNumber_CoerceEx()``, ``PyMember_Get``,
+ and ``PyMember_Set`` C APIs are removed.
+
+* New C API ``PyImport_ImportModuleNoBlock()``, works like
+ ``PyImport_ImportModule()`` but won't block on the import lock (returning
+ an error instead).
+
.. ======================================================================
@@ -366,6 +426,7 @@ Port-Specific Changes
Platform-specific changes go here.
+
.. ======================================================================