Skip to content

Commit 1baf465

Browse files
committed
Merged revisions 76847,76851,76869,76882,76891-76892,76924,77007,77070,77092,77096,77120,77126,77155 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r76847 | benjamin.peterson | 2009-12-14 21:25:27 -0600 (Mon, 14 Dec 2009) | 1 line adverb ........ r76851 | benjamin.peterson | 2009-12-15 21:28:52 -0600 (Tue, 15 Dec 2009) | 1 line remove lib2to3 resource ........ r76869 | vinay.sajip | 2009-12-17 08:52:00 -0600 (Thu, 17 Dec 2009) | 1 line Issue #7529: logging: Minor correction to documentation. ........ r76882 | georg.brandl | 2009-12-19 11:30:28 -0600 (Sat, 19 Dec 2009) | 1 line #7527: use standard versionadded tags. ........ r76891 | georg.brandl | 2009-12-19 12:16:31 -0600 (Sat, 19 Dec 2009) | 1 line #7479: add note about function availability on Unices. ........ r76892 | georg.brandl | 2009-12-19 12:20:18 -0600 (Sat, 19 Dec 2009) | 1 line #7480: remove tautology. ........ r76924 | georg.brandl | 2009-12-20 08:28:05 -0600 (Sun, 20 Dec 2009) | 1 line Small indentation fix. ........ r77007 | gregory.p.smith | 2009-12-23 03:31:11 -0600 (Wed, 23 Dec 2009) | 3 lines Fix possible integer overflow in lchown and fchown functions. For issue1747858. ........ r77070 | amaury.forgeotdarc | 2009-12-27 14:06:44 -0600 (Sun, 27 Dec 2009) | 2 lines Fix a typo in comment ........ r77092 | georg.brandl | 2009-12-28 02:48:24 -0600 (Mon, 28 Dec 2009) | 1 line #7404: remove reference to non-existing example files. ........ r77096 | benjamin.peterson | 2009-12-28 14:51:17 -0600 (Mon, 28 Dec 2009) | 1 line document new fix_callable behavior ........ r77120 | georg.brandl | 2009-12-29 15:09:17 -0600 (Tue, 29 Dec 2009) | 1 line #7595: fix typo in argument default constant. ........ r77126 | amaury.forgeotdarc | 2009-12-29 17:06:17 -0600 (Tue, 29 Dec 2009) | 2 lines #7579: Add docstrings to the msvcrt module ........ r77155 | georg.brandl | 2009-12-30 13:03:00 -0600 (Wed, 30 Dec 2009) | 1 line We only support Windows NT derivatives now. ........
1 parent 2591d21 commit 1baf465

16 files changed

Lines changed: 195 additions & 75 deletions

Doc/faq/design.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ on the entrance and exit from the block. Some language have a construct that
810810
looks like this::
811811

812812
with obj:
813-
a = 1 # equivalent to obj.a = 1
813+
a = 1 # equivalent to obj.a = 1
814814
total = total + 1 # obj.total = obj.total + 1
815815

816816
In Python, such a construct would be ambiguous.

Doc/library/2to3.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ and off individually. They are described here in more detail.
122122
123123
.. 2to3fixer:: callable
124124
125-
Converts ``callable(x)`` to ``hasattr(x, "__call_")``.
125+
Converts ``callable(x)`` to ``isinstance(x, collections.Callable)``, adding
126+
an import to :mod:`collections` if needed.
126127
127128
.. 2to3fixer:: dict
128129

Doc/library/ctypes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,7 @@ Here is what we get on Windows::
10051005
>>>
10061006

10071007
It is funny to see that on linux the sort function seems to work much more
1008-
efficient, it is doing less comparisons::
1008+
efficiently, it is doing less comparisons::
10091009

10101010
>>> qsort(ia, len(ia), sizeof(c_int), cmp_func) # doctest: +LINUX
10111011
py_cmp_func 5 1

Doc/library/logging.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1659,6 +1659,8 @@ file-like object (or, more precisely, any object which supports :meth:`write`
16591659
and :meth:`flush` methods).
16601660

16611661

1662+
.. currentmodule:: logging
1663+
16621664
.. class:: StreamHandler(stream=None)
16631665

16641666
Returns a new instance of the :class:`StreamHandler` class. If *stream* is

Doc/library/msvcrt.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,4 @@ Other Functions
144144
.. function:: heapmin()
145145

146146
Force the :cfunc:`malloc` heap to clean itself up and return unused blocks to
147-
the operating system. This only works on Windows NT. On failure, this raises
148-
:exc:`IOError`.
149-
147+
the operating system. On failure, this raises :exc:`IOError`.

Doc/library/optparse.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,7 @@ required option
153153
an option that must be supplied on the command-line; note that the phrase
154154
"required option" is self-contradictory in English. :mod:`optparse` doesn't
155155
prevent you from implementing required options, but doesn't give you much
156-
help at it either. See ``examples/required_1.py`` and
157-
``examples/required_2.py`` in the :mod:`optparse` source distribution for two
158-
ways to implement required options with :mod:`optparse`.
156+
help at it either.
159157

160158
For example, consider this hypothetical command-line::
161159

Doc/library/os.rst

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,34 @@ module. For creating temporary files and directories see the :mod:`tempfile`
1313
module, and for high-level file and directory handling see the :mod:`shutil`
1414
module.
1515

16-
The design of all built-in operating system dependent modules of Python is such
17-
that as long as the same functionality is available, it uses the same interface;
18-
for example, the function ``os.stat(path)`` returns stat information about
19-
*path* in the same format (which happens to have originated with the POSIX
20-
interface).
16+
Notes on the availability of these functions:
2117

22-
Extensions peculiar to a particular operating system are also available through
23-
the :mod:`os` module, but using them is of course a threat to portability!
18+
* The design of all built-in operating system dependent modules of Python is
19+
such that as long as the same functionality is available, it uses the same
20+
interface; for example, the function ``os.stat(path)`` returns stat
21+
information about *path* in the same format (which happens to have originated
22+
with the POSIX interface).
2423

25-
.. note::
24+
* Extensions peculiar to a particular operating system are also available
25+
through the :mod:`os` module, but using them is of course a threat to
26+
portability.
2627

27-
All functions accepting path or file names accept both bytes and string
28-
objects, and result in an object of the same type, if a path or file name is
29-
returned.
28+
* All functions accepting path or file names accept both bytes and string
29+
objects, and result in an object of the same type, if a path or file name is
30+
returned.
3031

3132
.. note::
3233

3334
If not separately noted, all functions that claim "Availability: Unix" are
3435
supported on Mac OS X, which builds on a Unix core.
3536

37+
* An "Availability: Unix" note means that this function is commonly found on
38+
Unix systems. It does not make any claims about its existence on a specific
39+
operating system.
40+
41+
* If not separately noted, all functions that claim "Availability: Unix" are
42+
supported on Mac OS X, which builds on a Unix core.
43+
3644
.. note::
3745

3846
All functions in this module raise :exc:`OSError` in the case of invalid or
@@ -46,9 +54,9 @@ the :mod:`os` module, but using them is of course a threat to portability!
4654

4755
.. data:: name
4856

49-
The name of the operating system dependent module imported. The following names
50-
have currently been registered: ``'posix'``, ``'nt'``, ``'mac'``, ``'os2'``,
51-
``'ce'``, ``'java'``.
57+
The name of the operating system dependent module imported. The following
58+
names have currently been registered: ``'posix'``, ``'nt'``, ``'mac'``,
59+
``'os2'``, ``'ce'``, ``'java'``.
5260

5361

5462
.. _os-filenames:

Doc/library/select.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ The module defines the following:
4545
:ref:`kqueue-objects` below for the methods supported by kqueue objects.
4646

4747

48-
.. function:: kevent(ident, filter=KQ_FILTER_READ, flags=KQ_ADD, fflags=0, data=0, udata=0)
48+
.. function:: kevent(ident, filter=KQ_FILTER_READ, flags=KQ_EV_ADD, fflags=0, data=0, udata=0)
4949

5050
(Only supported on BSD.) Returns a kernel event object object; see section
5151
:ref:`kevent-objects` below for the methods supported by kqueue objects.

Doc/library/stdtypes.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2458,8 +2458,7 @@ types, where they are relevant. Some of these are not reported by the
24582458

24592459
.. attribute:: class.__bases__
24602460

2461-
The tuple of base classes of a class object. If there are no base classes, this
2462-
will be an empty tuple.
2461+
The tuple of base classes of a class object.
24632462

24642463

24652464
.. attribute:: class.__name__

Doc/library/string.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ substitutions and value formatting via the :func:`format` method described in
8686
you to create and customize your own string formatting behaviors using the same
8787
implementation as the built-in :meth:`format` method.
8888

89+
8990
.. class:: Formatter
9091

9192
The :class:`Formatter` class has the following public methods:
@@ -470,6 +471,8 @@ The available presentation types for floating point and decimal values are:
470471
Template strings
471472
----------------
472473

474+
.. versionadded:: 2.4
475+
473476
Templates provide simpler string substitutions as described in :pep:`292`.
474477
Instead of the normal ``%``\ -based substitutions, Templates support ``$``\
475478
-based substitutions, using the following rules:

0 commit comments

Comments
 (0)