Skip to content

Commit b8d83a4

Browse files
author
georg.brandl
committed
Merged revisions 74613,74615,74619-74620,74622 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k ................ r74613 | georg.brandl | 2009-09-01 09:34:27 +0200 (Di, 01 Sep 2009) | 1 line #6814: remove traces of xrange(). ................ r74615 | georg.brandl | 2009-09-01 09:42:40 +0200 (Di, 01 Sep 2009) | 9 lines Recorded merge of revisions 74614 via svnmerge from svn+ssh://[email protected]/python/trunk ........ r74614 | georg.brandl | 2009-09-01 09:40:54 +0200 (Di, 01 Sep 2009) | 1 line #6813: better documentation for numberless string formats. ........ ................ r74619 | georg.brandl | 2009-09-01 10:02:03 +0200 (Di, 01 Sep 2009) | 1 line #6754: remove old struct member nb_inplace_divide. ................ r74620 | georg.brandl | 2009-09-01 10:03:26 +0200 (Di, 01 Sep 2009) | 1 line #6732: fix return value of module init function in example. ................ r74622 | georg.brandl | 2009-09-01 10:11:14 +0200 (Di, 01 Sep 2009) | 73 lines 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. ........ ................ git-svn-id: http://svn.python.org/projects/python/branches/release31-maint@74624 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 1b2a0cb commit b8d83a4

20 files changed

Lines changed: 71 additions & 50 deletions

File tree

Doc/c-api/typeobj.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,6 @@ Number Object Structures
10521052
binaryfunc nb_inplace_add;
10531053
binaryfunc nb_inplace_subtract;
10541054
binaryfunc nb_inplace_multiply;
1055-
binaryfunc nb_inplace_divide;
10561055
binaryfunc nb_inplace_remainder;
10571056
ternaryfunc nb_inplace_power;
10581057
binaryfunc nb_inplace_lshift;

Doc/includes/mp_pool.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,17 +98,17 @@ def test():
9898

9999
t = time.time()
100100
A = list(map(pow3, range(N)))
101-
print('\tmap(pow3, xrange(%d)):\n\t\t%s seconds' % \
101+
print('\tmap(pow3, range(%d)):\n\t\t%s seconds' % \
102102
(N, time.time() - t))
103103

104104
t = time.time()
105105
B = pool.map(pow3, range(N))
106-
print('\tpool.map(pow3, xrange(%d)):\n\t\t%s seconds' % \
106+
print('\tpool.map(pow3, range(%d)):\n\t\t%s seconds' % \
107107
(N, time.time() - t))
108108

109109
t = time.time()
110110
C = list(pool.imap(pow3, range(N), chunksize=N//8))
111-
print('\tlist(pool.imap(pow3, xrange(%d), chunksize=%d)):\n\t\t%s' \
111+
print('\tlist(pool.imap(pow3, range(%d), chunksize=%d)):\n\t\t%s' \
112112
' seconds' % (N, N//8, time.time() - t))
113113

114114
assert A == B == C, (len(A), len(B), len(C))

Doc/includes/shoddy.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,5 @@ PyInit_shoddy(void)
9595

9696
Py_INCREF(&ShoddyType);
9797
PyModule_AddObject(m, "Shoddy", (PyObject *) &ShoddyType);
98+
return m;
9899
}

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: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ by file descriptors.
396396
Close all file descriptors from *fd_low* (inclusive) to *fd_high* (exclusive),
397397
ignoring errors. Availability: Unix, Windows. Equivalent to::
398398

399-
for fd in xrange(fd_low, fd_high):
399+
for fd in range(fd_low, fd_high):
400400
try:
401401
os.close(fd)
402402
except OSError:
@@ -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:

0 commit comments

Comments
 (0)