Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a6053b4

Browse files
committed
Merged revisions 74542,74544-74548,74550,74554-74555,74578,74588,74590,74603,74616-74618,74621 via svnmerge from
svn+ssh://[email protected]/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. ........
1 parent 2c52e2f commit a6053b4

12 files changed

Lines changed: 46 additions & 32 deletions

File tree

Doc/library/_thread.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ In addition to these methods, lock objects can also be used via the
147147
module is available, interrupts always go to the main thread.)
148148

149149
* Calling :func:`sys.exit` or raising the :exc:`SystemExit` exception is
150-
equivalent to calling :func:`exit`.
150+
equivalent to calling :func:`_thread.exit`.
151151

152152
* Not all built-in functions that may block waiting for I/O allow other threads
153153
to run. (The most popular ones (:func:`time.sleep`, :meth:`file.read`,

Doc/library/codecs.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,8 @@ or with dictionaries as mapping tables. The following table lists the codecs by
891891
name, together with a few common aliases, and the languages for which the
892892
encoding is likely used. Neither the list of aliases nor the list of languages
893893
is meant to be exhaustive. Notice that spelling alternatives that only differ in
894-
case or use a hyphen instead of an underscore are also valid aliases.
894+
case or use a hyphen instead of an underscore are also valid aliases; therefore,
895+
e.g. ``'utf-8'`` is a valid alias for the ``'utf_8'`` codec.
895896

896897
Many of the character sets support the same languages. They vary in individual
897898
characters (e.g. whether the EURO SIGN is supported or not), and in the

Doc/library/ctypes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1592,7 +1592,7 @@ type and the argument types of the function.
15921592
The returned function prototype creates functions that use the standard C
15931593
calling convention. The function will release the GIL during the call. If
15941594
*use_errno* is set to True, the ctypes private copy of the system
1595-
:data:`errno` variable is exchanged with the real :data:`errno` value bafore
1595+
:data:`errno` variable is exchanged with the real :data:`errno` value before
15961596
and after the call; *use_last_error* does the same for the Windows error
15971597
code.
15981598

Doc/library/math.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,10 @@ Power and logarithmic functions
150150

151151
.. function:: log(x[, base])
152152

153-
Return the logarithm of *x* to the given *base*. If the *base* is not specified,
154-
return the natural logarithm of *x* (that is, the logarithm to base *e*).
153+
With one argument, return the natural logarithm of *x* (to base *e*).
154+
155+
With two arguments, return the logarithm of *x* to the given *base*,
156+
calculated as ``log(x)/log(base)``.
155157

156158

157159
.. function:: log1p(x)
@@ -162,7 +164,8 @@ Power and logarithmic functions
162164

163165
.. function:: log10(x)
164166

165-
Return the base-10 logarithm of *x*.
167+
Return the base-10 logarithm of *x*. This is usually more accurate
168+
than ``log(x, 10)``.
166169

167170

168171
.. function:: pow(x, y)

Doc/library/optparse.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,19 +1166,20 @@ where the input parameters are
11661166
the list of arguments to process (default: ``sys.argv[1:]``)
11671167

11681168
``values``
1169-
object to store option arguments in (default: a new instance of optparse.Values)
1169+
object to store option arguments in (default: a new instance of
1170+
:class:`optparse.Values`)
11701171

11711172
and the return values are
11721173

11731174
``options``
1174-
the same object that was passed in as ``options``, or the optparse.Values
1175+
the same object that was passed in as ``values``, or the optparse.Values
11751176
instance created by :mod:`optparse`
11761177

11771178
``args``
11781179
the leftover positional arguments after all options have been processed
11791180

11801181
The most common usage is to supply neither keyword argument. If you supply
1181-
``options``, it will be modified with repeated ``setattr()`` calls (roughly one
1182+
``values``, it will be modified with repeated ``setattr()`` calls (roughly one
11821183
for every option argument stored to an option destination) and returned by
11831184
:meth:`parse_args`.
11841185

Doc/library/os.rst

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -947,12 +947,12 @@ Files and Directories
947947

948948
.. function:: remove(path)
949949

950-
Remove the file *path*. If *path* is a directory, :exc:`OSError` is raised; see
951-
:func:`rmdir` below to remove a directory. This is identical to the
952-
:func:`unlink` function documented below. On Windows, attempting to remove a
953-
file that is in use causes an exception to be raised; on Unix, the directory
954-
entry is removed but the storage allocated to the file is not made available
955-
until the original file is no longer in use. Availability: Unix,
950+
Remove (delete) the file *path*. If *path* is a directory, :exc:`OSError` is
951+
raised; see :func:`rmdir` below to remove a directory. This is identical to
952+
the :func:`unlink` function documented below. On Windows, attempting to
953+
remove a file that is in use causes an exception to be raised; on Unix, the
954+
directory entry is removed but the storage allocated to the file is not made
955+
available until the original file is no longer in use. Availability: Unix,
956956
Windows.
957957

958958

@@ -997,7 +997,10 @@ Files and Directories
997997

998998
.. function:: rmdir(path)
999999

1000-
Remove the directory *path*. Availability: Unix, Windows.
1000+
Remove (delete) the directory *path*. Only works when the directory is
1001+
empty, otherwise, :exc:`OSError` is raised. In order to remove whole
1002+
directory trees, :func:`shutil.rmtree` can be used. Availability: Unix,
1003+
Windows.
10011004

10021005

10031006
.. function:: stat(path)
@@ -1099,9 +1102,9 @@ Files and Directories
10991102

11001103
.. function:: unlink(path)
11011104

1102-
Remove the file *path*. This is the same function as :func:`remove`; the
1103-
:func:`unlink` name is its traditional Unix name. Availability: Unix,
1104-
Windows.
1105+
Remove (delete) the file *path*. This is the same function as
1106+
:func:`remove`; the :func:`unlink` name is its traditional Unix
1107+
name. Availability: Unix, Windows.
11051108

11061109

11071110
.. function:: utime(path, times)

Doc/library/signal.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,9 @@ The :mod:`signal` module defines the following functions:
205205
exception to be raised.
206206

207207
The *handler* is called with two arguments: the signal number and the current
208-
stack frame (``None`` or a frame object; for a description of frame objects, see
209-
the reference manual section on the standard type hierarchy or see the attribute
210-
descriptions in the :mod:`inspect` module).
208+
stack frame (``None`` or a frame object; for a description of frame objects,
209+
see the :ref:`description in the type hierarchy <frame-objects>` or see the
210+
attribute descriptions in the :mod:`inspect` module).
211211

212212

213213
.. _signal-example:

Doc/library/stdtypes.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1724,12 +1724,12 @@ The constructors for both classes work the same:
17241724
.. method:: update(other, ...)
17251725
set |= other | ...
17261726

1727-
Update the set, adding elements from *other*.
1727+
Update the set, adding elements from all others.
17281728

17291729
.. method:: intersection_update(other, ...)
17301730
set &= other & ...
17311731

1732-
Update the set, keeping only elements found in it and *other*.
1732+
Update the set, keeping only elements found in it and all others.
17331733

17341734
.. method:: difference_update(other, ...)
17351735
set -= other | ...
@@ -2478,9 +2478,9 @@ decimal arithmetic context. The specific types are not treated specially beyond
24782478
their implementation of the context management protocol. See the
24792479
:mod:`contextlib` module for some examples.
24802480

2481-
Python's :term:`generator`\s and the ``contextlib.contextfactory`` :term:`decorator`
2481+
Python's :term:`generator`\s and the ``contextlib.contextmanager`` :term:`decorator`
24822482
provide a convenient way to implement these protocols. If a generator function is
2483-
decorated with the ``contextlib.contextfactory`` decorator, it will return a
2483+
decorated with the ``contextlib.contextmanager`` decorator, it will return a
24842484
context manager implementing the necessary :meth:`__enter__` and
24852485
:meth:`__exit__` methods, rather than the iterator produced by an undecorated
24862486
generator function.

Doc/reference/datamodel.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -864,6 +864,8 @@ Internal types
864864
If a code object represents a function, the first item in :attr:`co_consts` is
865865
the documentation string of the function, or ``None`` if undefined.
866866

867+
.. _frame-objects:
868+
867869
Frame objects
868870
.. index:: object: frame
869871

Doc/tutorial/classes.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ need for two different argument passing mechanisms as in Pascal.
5151

5252
.. _tut-scopes:
5353

54-
Python Scopes and Name Spaces
55-
=============================
54+
Python Scopes and Namespaces
55+
============================
5656

5757
Before introducing classes, I first have to tell you something about Python's
5858
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
8787
:keyword:`del` statement. For example, ``del modname.the_answer`` will remove
8888
the attribute :attr:`the_answer` from the object named by ``modname``.
8989

90-
Name spaces are created at different moments and have different lifetimes. The
90+
Namespaces are created at different moments and have different lifetimes. The
9191
namespace containing the built-in names is created when the Python interpreter
9292
starts up, and is never deleted. The global namespace for a module is created
9393
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
381381
attribute that is a function object, a method object is created by packing
382382
(pointers to) the instance object and the function object just found together in
383383
an abstract object: this is the method object. When the method object is called
384-
with an argument list, it is unpacked again, a new argument list is constructed
385-
from the instance object and the original argument list, and the function object
386-
is called with this new argument list.
384+
with an argument list, a new argument list is constructed from the instance
385+
object and the argument list, and the function object is called with this new
386+
argument list.
387387

388388

389389
.. _tut-remarks:

0 commit comments

Comments
 (0)