summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2008-01-17 12:00:15 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2008-01-17 12:00:15 (GMT)
commitd221956f0e67f81a9381bab7eb4e22b78743d99c (patch)
tree6ca4a170fcc7b667d7b18ca22967627d6f2d3e20
parentbde4ae4bdeb3328fbc744662ecdebfac52b2d5ba (diff)
downloadcpython-d221956f0e67f81a9381bab7eb4e22b78743d99c.zip
cpython-d221956f0e67f81a9381bab7eb4e22b78743d99c.tar.gz
cpython-d221956f0e67f81a9381bab7eb4e22b78743d99c.tar.bz2
Revise 3141 section a bit; add some Windows items
-rw-r--r--Doc/whatsnew/2.6.rst36
1 files changed, 17 insertions, 19 deletions
diff --git a/Doc/whatsnew/2.6.rst b/Doc/whatsnew/2.6.rst
index 48efaba..a47573c 100644
--- a/Doc/whatsnew/2.6.rst
+++ b/Doc/whatsnew/2.6.rst
@@ -549,7 +549,7 @@ PEP 3141: A Type Hierarchy for Numbers
=====================================================
In Python 3.0, several abstract base classes for numeric types,
-inspired by Scheme's numeric tower (XXX add link), are being added.
+inspired by Scheme's numeric tower, are being added.
This change was backported to 2.6 as the :mod:`numbers` module.
The most general ABC is :class:`Number`. It defines no operations at
@@ -585,27 +585,17 @@ can be shifted left and right with ``<<`` and ``>>``,
combined using bitwise operations such as ``&`` and ``|``,
and can be used as array indexes and slice boundaries.
-The PEP slightly redefines the existing built-ins :func:`math.floor`,
-:func:`math.ceil`, :func:`round`, and adds a new one, :func:`trunc`. All of them
-take a :class:`Real` value and return an :class:`Integral`.
+In Python 3.0, the PEP slightly redefines the existing built-ins
+:func:`math.floor`, :func:`math.ceil`, :func:`round`, and adds a new
+one, :func:`trunc`, that's been backported to Python 2.6.
+:func:`trunc` rounds toward zero, returning the closest
+:class:`Integral` that's between the function's argument and zero.
-* :func:`math.floor` returns the closest :class:`Integral` that's
- smaller than the function's argument. Numeric types can define a
- :meth:`__floor__` method to provide a custom implementation.
-
-* :func:`math.ceil` returns the closest :class:`Integral` that's
- greater than the function's argument. It can be provided by a
- :meth:`__ceil__` method.
-
-* :func:`trunc` rounds toward zero, returning the closest
- :class:`Integral` that's between the function's argument and zero.
- It can be provided by a :meth:`__trunc` method.
+.. seealso::
-* :func:`round` takes a :class:`Real` and rounds it off, optionally to a
- specified number of decimal places. It will call a :meth:`__round__`
- method. Whether .5 should be rounded up, or down, or toward the
- nearest even number, is left up to the type's implementation.
+ XXX link: Discusses Scheme's numeric tower.
+
The Rational Module
--------------------------------------------------
@@ -1347,6 +1337,14 @@ Port-Specific Changes: Windows
value, as does the :func:`getwche` function. The :func:`putwch` function
takes a Unicode character and writes it to the console.
+* :func:`os.path.expandvars` will now expand environment variables
+ in the form "%var%", and "~user" will be expanded into the
+ user's home directory path. (Contributed by Josiah Carlson.)
+
+* The :mod:`socket` module's socket objects now have an
+ :meth:`ioctl` method that provides a limited interface to the
+ :cfunc:`WSAIoctl` system interface.
+
* The :mod:`_winreg` module now has a function,
:func:`ExpandEnvironmentStrings`,
that expands environment variable references such as ``%NAME%``