summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-09-01 08:11:14 +0000
committerGeorg Brandl <georg@python.org>2009-09-01 08:11:14 +0000
commit2088dbc07daf345001a198091a0acecfa17ce1e9 (patch)
tree2059fff95c043377f34675406f48698a581744e6
parent59f9273a5043be2ee6c5d4f30c26d69208dcfcb3 (diff)
downloadcpython-2088dbc07daf345001a198091a0acecfa17ce1e9.tar.gz
Merged revisions 74542,74544-74548,74550,74554-74555,74578,74588,74590,74603,74616-74618,74621 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r74542 | georg.brandl | 2009-08-23 23:28:56 +0200 (So, 23 Aug 2009) | 1 line Restore alphabetic order. ........ r74544 | georg.brandl | 2009-08-24 19:12:30 +0200 (Mo, 24 Aug 2009) | 1 line #6775: fix python.org URLs in README. ........ r74545 | georg.brandl | 2009-08-24 19:14:29 +0200 (Mo, 24 Aug 2009) | 1 line #6772: mention utf-8 as utf8 alias. ........ r74546 | georg.brandl | 2009-08-24 19:20:40 +0200 (Mo, 24 Aug 2009) | 1 line #6725: spell "namespace" consistently. ........ r74547 | georg.brandl | 2009-08-24 19:22:05 +0200 (Mo, 24 Aug 2009) | 1 line #6718: fix example. ........ r74548 | georg.brandl | 2009-08-24 19:24:27 +0200 (Mo, 24 Aug 2009) | 1 line #6677: mention "deleting" as an alias for removing files. ........ r74550 | georg.brandl | 2009-08-24 19:48:40 +0200 (Mo, 24 Aug 2009) | 1 line #6677: note that rmdir only removes empty directories. ........ r74554 | georg.brandl | 2009-08-27 20:59:02 +0200 (Do, 27 Aug 2009) | 1 line Typo fix. ........ r74555 | georg.brandl | 2009-08-27 21:02:43 +0200 (Do, 27 Aug 2009) | 1 line #6787: reference fix. ........ r74578 | tarek.ziade | 2009-08-29 15:33:21 +0200 (Sa, 29 Aug 2009) | 1 line fixed #6801: symmetric_difference_update also accepts pipe ........ r74588 | georg.brandl | 2009-08-30 10:35:01 +0200 (So, 30 Aug 2009) | 1 line #6803: fix old name. ........ r74590 | georg.brandl | 2009-08-30 13:51:53 +0200 (So, 30 Aug 2009) | 1 line #6801: fix copy-paste oversight. ........ r74603 | georg.brandl | 2009-08-31 08:38:29 +0200 (Mo, 31 Aug 2009) | 1 line other -> others where multiple arguments are accepted. ........ r74616 | georg.brandl | 2009-09-01 09:46:26 +0200 (Di, 01 Sep 2009) | 1 line #6808: clarification. ........ r74617 | georg.brandl | 2009-09-01 09:53:37 +0200 (Di, 01 Sep 2009) | 1 line #6765: hint that log(x, base) is not very sophisticated. ........ r74618 | georg.brandl | 2009-09-01 10:00:47 +0200 (Di, 01 Sep 2009) | 1 line #6810: add a link to the section about frame objects instead of just a description where to find it. ........ r74621 | georg.brandl | 2009-09-01 10:06:03 +0200 (Di, 01 Sep 2009) | 1 line #6638: fix wrong parameter name and markup a class. ........
-rw-r--r--Doc/library/_thread.rst2
-rw-r--r--Doc/library/codecs.rst3
-rw-r--r--Doc/library/ctypes.rst2
-rw-r--r--Doc/library/math.rst9
-rw-r--r--Doc/library/optparse.rst7
-rw-r--r--Doc/library/os.rst23
-rw-r--r--Doc/library/signal.rst6
-rw-r--r--Doc/library/stdtypes.rst8
-rw-r--r--Doc/reference/datamodel.rst2
-rw-r--r--Doc/tutorial/classes.rst12
-rw-r--r--Misc/ACKS1
-rw-r--r--Misc/NEWS3
12 files changed, 46 insertions, 32 deletions
diff --git a/Doc/library/_thread.rst b/Doc/library/_thread.rst
index 95214d6515..cb624078ca 100644
--- a/Doc/library/_thread.rst
+++ b/Doc/library/_thread.rst
@@ -147,7 +147,7 @@ In addition to these methods, lock objects can also be used via the
module is available, interrupts always go to the main thread.)
* Calling :func:`sys.exit` or raising the :exc:`SystemExit` exception is
- equivalent to calling :func:`exit`.
+ equivalent to calling :func:`_thread.exit`.
* Not all built-in functions that may block waiting for I/O allow other threads
to run. (The most popular ones (:func:`time.sleep`, :meth:`file.read`,
diff --git a/Doc/library/codecs.rst b/Doc/library/codecs.rst
index 82d63b0c7a..8116694e82 100644
--- a/Doc/library/codecs.rst
+++ b/Doc/library/codecs.rst
@@ -891,7 +891,8 @@ or with dictionaries as mapping tables. The following table lists the codecs by
name, together with a few common aliases, and the languages for which the
encoding is likely used. Neither the list of aliases nor the list of languages
is meant to be exhaustive. Notice that spelling alternatives that only differ in
-case or use a hyphen instead of an underscore are also valid aliases.
+case or use a hyphen instead of an underscore are also valid aliases; therefore,
+e.g. ``'utf-8'`` is a valid alias for the ``'utf_8'`` codec.
Many of the character sets support the same languages. They vary in individual
characters (e.g. whether the EURO SIGN is supported or not), and in the
diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst
index ded0df8c1b..ad5adee8aa 100644
--- a/Doc/library/ctypes.rst
+++ b/Doc/library/ctypes.rst
@@ -1592,7 +1592,7 @@ type and the argument types of the function.
The returned function prototype creates functions that use the standard C
calling convention. The function will release the GIL during the call. If
*use_errno* is set to True, the ctypes private copy of the system
- :data:`errno` variable is exchanged with the real :data:`errno` value bafore
+ :data:`errno` variable is exchanged with the real :data:`errno` value before
and after the call; *use_last_error* does the same for the Windows error
code.
diff --git a/Doc/library/math.rst b/Doc/library/math.rst
index 488230ad12..566603d4c3 100644
--- a/Doc/library/math.rst
+++ b/Doc/library/math.rst
@@ -150,8 +150,10 @@ Power and logarithmic functions
.. function:: log(x[, base])
- Return the logarithm of *x* to the given *base*. If the *base* is not specified,
- return the natural logarithm of *x* (that is, the logarithm to base *e*).
+ With one argument, return the natural logarithm of *x* (to base *e*).
+
+ With two arguments, return the logarithm of *x* to the given *base*,
+ calculated as ``log(x)/log(base)``.
.. function:: log1p(x)
@@ -162,7 +164,8 @@ Power and logarithmic functions
.. function:: log10(x)
- Return the base-10 logarithm of *x*.
+ Return the base-10 logarithm of *x*. This is usually more accurate
+ than ``log(x, 10)``.
.. function:: pow(x, y)
diff --git a/Doc/library/optparse.rst b/Doc/library/optparse.rst
index 6320fa71c5..a62ad240bf 100644
--- a/Doc/library/optparse.rst
+++ b/Doc/library/optparse.rst
@@ -1166,19 +1166,20 @@ where the input parameters are
the list of arguments to process (default: ``sys.argv[1:]``)
``values``
- object to store option arguments in (default: a new instance of optparse.Values)
+ object to store option arguments in (default: a new instance of
+ :class:`optparse.Values`)
and the return values are
``options``
- the same object that was passed in as ``options``, or the optparse.Values
+ the same object that was passed in as ``values``, or the optparse.Values
instance created by :mod:`optparse`
``args``
the leftover positional arguments after all options have been processed
The most common usage is to supply neither keyword argument. If you supply
-``options``, it will be modified with repeated ``setattr()`` calls (roughly one
+``values``, it will be modified with repeated ``setattr()`` calls (roughly one
for every option argument stored to an option destination) and returned by
:meth:`parse_args`.
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index 2548b70966..9bed1ce60c 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -947,12 +947,12 @@ Files and Directories
.. function:: remove(path)
- Remove the file *path*. If *path* is a directory, :exc:`OSError` is raised; see
- :func:`rmdir` below to remove a directory. This is identical to the
- :func:`unlink` function documented below. On Windows, attempting to remove a
- file that is in use causes an exception to be raised; on Unix, the directory
- entry is removed but the storage allocated to the file is not made available
- until the original file is no longer in use. Availability: Unix,
+ Remove (delete) the file *path*. If *path* is a directory, :exc:`OSError` is
+ raised; see :func:`rmdir` below to remove a directory. This is identical to
+ the :func:`unlink` function documented below. On Windows, attempting to
+ remove a file that is in use causes an exception to be raised; on Unix, the
+ directory entry is removed but the storage allocated to the file is not made
+ available until the original file is no longer in use. Availability: Unix,
Windows.
@@ -997,7 +997,10 @@ Files and Directories
.. function:: rmdir(path)
- Remove the directory *path*. Availability: Unix, Windows.
+ Remove (delete) the directory *path*. Only works when the directory is
+ empty, otherwise, :exc:`OSError` is raised. In order to remove whole
+ directory trees, :func:`shutil.rmtree` can be used. Availability: Unix,
+ Windows.
.. function:: stat(path)
@@ -1099,9 +1102,9 @@ Files and Directories
.. function:: unlink(path)
- Remove the file *path*. This is the same function as :func:`remove`; the
- :func:`unlink` name is its traditional Unix name. Availability: Unix,
- Windows.
+ Remove (delete) the file *path*. This is the same function as
+ :func:`remove`; the :func:`unlink` name is its traditional Unix
+ name. Availability: Unix, Windows.
.. function:: utime(path, times)
diff --git a/Doc/library/signal.rst b/Doc/library/signal.rst
index 2db17c5caa..7319ac943e 100644
--- a/Doc/library/signal.rst
+++ b/Doc/library/signal.rst
@@ -205,9 +205,9 @@ The :mod:`signal` module defines the following functions:
exception to be raised.
The *handler* is called with two arguments: the signal number and the current
- stack frame (``None`` or a frame object; for a description of frame objects, see
- the reference manual section on the standard type hierarchy or see the attribute
- descriptions in the :mod:`inspect` module).
+ stack frame (``None`` or a frame object; for a description of frame objects,
+ see the :ref:`description in the type hierarchy <frame-objects>` or see the
+ attribute descriptions in the :mod:`inspect` module).
.. _signal-example:
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index 14ad15ed53..f739f46b03 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -1724,12 +1724,12 @@ The constructors for both classes work the same:
.. method:: update(other, ...)
set |= other | ...
- Update the set, adding elements from *other*.
+ Update the set, adding elements from all others.
.. method:: intersection_update(other, ...)
set &= other & ...
- Update the set, keeping only elements found in it and *other*.
+ Update the set, keeping only elements found in it and all others.
.. method:: difference_update(other, ...)
set -= other | ...
@@ -2478,9 +2478,9 @@ decimal arithmetic context. The specific types are not treated specially beyond
their implementation of the context management protocol. See the
:mod:`contextlib` module for some examples.
-Python's :term:`generator`\s and the ``contextlib.contextfactory`` :term:`decorator`
+Python's :term:`generator`\s and the ``contextlib.contextmanager`` :term:`decorator`
provide a convenient way to implement these protocols. If a generator function is
-decorated with the ``contextlib.contextfactory`` decorator, it will return a
+decorated with the ``contextlib.contextmanager`` decorator, it will return a
context manager implementing the necessary :meth:`__enter__` and
:meth:`__exit__` methods, rather than the iterator produced by an undecorated
generator function.
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index 14e0b20329..ef2f38212a 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -864,6 +864,8 @@ Internal types
If a code object represents a function, the first item in :attr:`co_consts` is
the documentation string of the function, or ``None`` if undefined.
+ .. _frame-objects:
+
Frame objects
.. index:: object: frame
diff --git a/Doc/tutorial/classes.rst b/Doc/tutorial/classes.rst
index 7ef41532a6..4e166d1031 100644
--- a/Doc/tutorial/classes.rst
+++ b/Doc/tutorial/classes.rst
@@ -51,8 +51,8 @@ need for two different argument passing mechanisms as in Pascal.
.. _tut-scopes:
-Python Scopes and Name Spaces
-=============================
+Python Scopes and Namespaces
+============================
Before introducing classes, I first have to tell you something about Python's
scope rules. Class definitions play some neat tricks with namespaces, and you
@@ -87,7 +87,7 @@ attributes is possible. Module attributes are writable: you can write
:keyword:`del` statement. For example, ``del modname.the_answer`` will remove
the attribute :attr:`the_answer` from the object named by ``modname``.
-Name spaces are created at different moments and have different lifetimes. The
+Namespaces are created at different moments and have different lifetimes. The
namespace containing the built-in names is created when the Python interpreter
starts up, and is never deleted. The global namespace for a module is created
when the module definition is read in; normally, module namespaces also last
@@ -381,9 +381,9 @@ data attribute, its class is searched. If the name denotes a valid class
attribute that is a function object, a method object is created by packing
(pointers to) the instance object and the function object just found together in
an abstract object: this is the method object. When the method object is called
-with an argument list, it is unpacked again, a new argument list is constructed
-from the instance object and the original argument list, and the function object
-is called with this new argument list.
+with an argument list, a new argument list is constructed from the instance
+object and the argument list, and the function object is called with this new
+argument list.
.. _tut-remarks:
diff --git a/Misc/ACKS b/Misc/ACKS
index e4086bd701..c9dcad0a4a 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -791,6 +791,7 @@ Mats Wichmann
Truida Wiedijk
Felix Wiemann
Gerry Wiener
+Frank Wierzbicki
Bryce "Zooko" Wilcox-O'Hearn
John Williams
Sue Williams
diff --git a/Misc/NEWS b/Misc/NEWS
index bc7f5b06fd..8c13e37003 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1549,6 +1549,9 @@ Build
- Issue #4204: Fixed module build errors on FreeBSD 4.
+- Issue #6801 : symmetric_difference_update also accepts |.
+ Thanks to Carl Chenet.
+
C-API
-----