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

Skip to content

Commit f6c8fd6

Browse files
committed
Merged revisions 86537,86867-86868,86881,86887,86913-86915,86931-86933,86960,86964,86974,86980,86996,87008,87050 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k ........ r86537 | georg.brandl | 2010-11-19 23:09:04 +0100 (Fr, 19 Nov 2010) | 1 line Do not put a raw REPLACEMENT CHARACTER in the document. ........ r86867 | georg.brandl | 2010-11-29 15:50:54 +0100 (Mo, 29 Nov 2010) | 1 line Fix indentation bug. ........ r86868 | georg.brandl | 2010-11-29 15:53:15 +0100 (Mo, 29 Nov 2010) | 1 line Fix heading style inconsistencies. ........ r86881 | georg.brandl | 2010-11-30 08:43:28 +0100 (Di, 30 Nov 2010) | 1 line #10584: fix bad links. ........ r86887 | georg.brandl | 2010-11-30 15:57:54 +0100 (Di, 30 Nov 2010) | 1 line Fix typo. ........ r86913 | georg.brandl | 2010-12-01 16:32:43 +0100 (Mi, 01 Dez 2010) | 1 line Add missing word, and add a better reference to the actual function. ........ r86914 | georg.brandl | 2010-12-01 16:36:33 +0100 (Mi, 01 Dez 2010) | 1 line #10594: fix parameter names in PyList API docs. ........ r86915 | georg.brandl | 2010-12-01 16:44:25 +0100 (Mi, 01 Dez 2010) | 1 line Fix some markup and style in the unittest docs. ........ r86931 | georg.brandl | 2010-12-02 10:06:12 +0100 (Do, 02 Dez 2010) | 1 line Fix-up documentation of makedirs(). ........ r86932 | david.malcolm | 2010-12-02 17:41:00 +0100 (Do, 02 Dez 2010) | 2 lines Fix spelling of Jamie Zawinski's surname in urllib.parse docstring (issue 10606) ........ r86933 | georg.brandl | 2010-12-02 19:02:01 +0100 (Do, 02 Dez 2010) | 1 line #10597: fix Py_SetPythonHome docs by pointing to where the meaning of PYTHONHOME is already documented. ........ r86960 | georg.brandl | 2010-12-03 08:55:44 +0100 (Fr, 03 Dez 2010) | 1 line #10360: catch TypeError in WeakSet.__contains__, just like WeakKeyDictionary does. ........ r86964 | georg.brandl | 2010-12-03 10:58:38 +0100 (Fr, 03 Dez 2010) | 1 line #10549: fix interface of docclass() for text documenter. ........ r86974 | georg.brandl | 2010-12-03 16:30:09 +0100 (Fr, 03 Dez 2010) | 1 line Markup consistency fixes. ........ r86980 | georg.brandl | 2010-12-03 18:19:27 +0100 (Fr, 03 Dez 2010) | 1 line Fix punctuation. ........ r86996 | georg.brandl | 2010-12-03 20:56:42 +0100 (Fr, 03 Dez 2010) | 1 line Fix indentation. ........ r87008 | georg.brandl | 2010-12-04 10:04:04 +0100 (Sa, 04 Dez 2010) | 1 line Fix typo. ........ r87050 | georg.brandl | 2010-12-04 18:09:30 +0100 (Sa, 04 Dez 2010) | 1 line Fix typo. ........
1 parent 622ce12 commit f6c8fd6

17 files changed

Lines changed: 62 additions & 51 deletions

File tree

Doc/c-api/init.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,9 @@ Process-wide parameters
318318
.. cfunction:: void Py_SetPythonHome(wchar_t *home)
319319

320320
Set the default "home" directory, that is, the location of the standard
321-
Python libraries. The libraries are searched in
322-
:file:`{home}/lib/python{version}` and :file:`{home}/lib/python{version}`.
321+
Python libraries. See :envvar:`PYTHONHOME` for the meaning of the
322+
argument string.
323+
323324
The argument should point to a zero-terminated character string in static
324325
storage whose contents will not change for the duration of the program's
325326
execution. No code in the Python interpreter will change the contents of

Doc/c-api/list.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ List Objects
3737

3838
.. note::
3939

40-
If *length* is greater than zero, the returned list object's items are
40+
If *len* is greater than zero, the returned list object's items are
4141
set to ``NULL``. Thus you cannot use abstract API functions such as
4242
:cfunc:`PySequence_SetItem` or expose the object to Python code before
4343
setting all items to a real object with :cfunc:`PyList_SetItem`.
@@ -58,9 +58,9 @@ List Objects
5858

5959
.. cfunction:: PyObject* PyList_GetItem(PyObject *list, Py_ssize_t index)
6060

61-
Return the object at position *pos* in the list pointed to by *p*. The
61+
Return the object at position *index* in the list pointed to by *list*. The
6262
position must be positive, indexing from the end of the list is not
63-
supported. If *pos* is out of bounds, return *NULL* and set an
63+
supported. If *index* is out of bounds, return *NULL* and set an
6464
:exc:`IndexError` exception.
6565

6666

Doc/howto/unicode.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,13 @@ Unicode result). The following examples show the differences::
265265
UnicodeDecodeError: 'utf8' codec can't decode byte 0x80 in position 0:
266266
unexpected code byte
267267
>>> b'\x80abc'.decode("utf-8", "replace")
268-
'\ufffdabc'
268+
'?abc'
269269
>>> b'\x80abc'.decode("utf-8", "ignore")
270270
'abc'
271271

272+
(In this code example, the Unicode replacement character has been replaced by
273+
a question mark because it may not be displayed on some systems.)
274+
272275
Encodings are specified as strings containing the encoding's name. Python 3.2
273276
comes with roughly 100 different encodings; see the Python Library Reference at
274277
:ref:`standard-encodings` for a list. Some encodings have multiple names; for

Doc/library/dbm.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ the Oracle Berkeley DB.
2020

2121
.. function:: whichdb(filename)
2222

23-
This functionattempts to guess which of the several simple database modules
23+
This function attempts to guess which of the several simple database modules
2424
available --- :mod:`dbm.gnu`, :mod:`dbm.ndbm` or :mod:`dbm.dumb` --- should
2525
be used to open a given file.
2626

Doc/library/difflib.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,6 @@ The :class:`SequenceMatcher` class has this constructor:
347347

348348
:class:`SequenceMatcher` objects have the following methods:
349349

350-
351350
.. method:: set_seqs(a, b)
352351

353352
Set the two sequences to be compared.

Doc/library/logging.rst

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -473,9 +473,7 @@ libraries, then the logger name specified can be "orgname.foo" rather than
473473
just "foo".
474474

475475
.. versionadded:: 3.1
476-
The :class:`NullHandler` class was not present in previous versions, but is
477-
now included, so that it need not be defined in library code.
478-
476+
The :class:`NullHandler` class.
479477

480478

481479
Logging Levels
@@ -593,8 +591,7 @@ provided:
593591
more information.
594592

595593
.. versionadded:: 3.1
596-
597-
The :class:`NullHandler` class was not present in previous versions.
594+
The :class:`NullHandler` class.
598595

599596
The :class:`NullHandler`, :class:`StreamHandler` and :class:`FileHandler`
600597
classes are defined in the core logging package. The other handlers are
@@ -1816,6 +1813,7 @@ sends logging output to a disk file. It inherits the output functionality from
18161813

18171814
Outputs the record to the file.
18181815

1816+
18191817
.. _null-handler:
18201818

18211819
NullHandler
@@ -1827,12 +1825,10 @@ The :class:`NullHandler` class, located in the core :mod:`logging` package,
18271825
does not do any formatting or output. It is essentially a "no-op" handler
18281826
for use by library developers.
18291827

1830-
18311828
.. class:: NullHandler()
18321829

18331830
Returns a new instance of the :class:`NullHandler` class.
18341831

1835-
18361832
.. method:: emit(record)
18371833

18381834
This method does nothing.
@@ -2609,29 +2605,29 @@ wire).
26092605
Returns the message for this :class:`LogRecord` instance after merging any
26102606
user-supplied arguments with the message.
26112607

2608+
26122609
.. _logger-adapter:
26132610

26142611
LoggerAdapter Objects
26152612
---------------------
26162613

26172614
:class:`LoggerAdapter` instances are used to conveniently pass contextual
26182615
information into logging calls. For a usage example , see the section on
2619-
`adding contextual information to your logging output`__.
2616+
:ref:`adding contextual information to your logging output <context-info>`.
26202617

2621-
__ context-info_
26222618

26232619
.. class:: LoggerAdapter(logger, extra)
26242620

2625-
Returns an instance of :class:`LoggerAdapter` initialized with an
2626-
underlying :class:`Logger` instance and a dict-like object.
2621+
Returns an instance of :class:`LoggerAdapter` initialized with an
2622+
underlying :class:`Logger` instance and a dict-like object.
26272623

2628-
.. method:: process(msg, kwargs)
2624+
.. method:: process(msg, kwargs)
26292625

2630-
Modifies the message and/or keyword arguments passed to a logging call in
2631-
order to insert contextual information. This implementation takes the object
2632-
passed as *extra* to the constructor and adds it to *kwargs* using key
2633-
'extra'. The return value is a (*msg*, *kwargs*) tuple which has the
2634-
(possibly modified) versions of the arguments passed in.
2626+
Modifies the message and/or keyword arguments passed to a logging call in
2627+
order to insert contextual information. This implementation takes the object
2628+
passed as *extra* to the constructor and adds it to *kwargs* using key
2629+
'extra'. The return value is a (*msg*, *kwargs*) tuple which has the
2630+
(possibly modified) versions of the arguments passed in.
26352631

26362632
In addition to the above, :class:`LoggerAdapter` supports all the logging
26372633
methods of :class:`Logger`, i.e. :meth:`debug`, :meth:`info`, :meth:`warning`,

Doc/library/os.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ Files and Directories
10151015
Availability: Unix, Windows.
10161016

10171017

1018-
.. function:: makedirs(path[, mode])
1018+
.. function:: makedirs(path, mode=0o777)
10191019

10201020
.. index::
10211021
single: directory; creating
@@ -1029,8 +1029,8 @@ Files and Directories
10291029

10301030
.. note::
10311031

1032-
:func:`makedirs` will become confused if the path elements to create include
1033-
:data:`os.pardir`.
1032+
:func:`makedirs` will become confused if the path elements to create
1033+
include :data:`pardir`.
10341034

10351035
This function handles UNC paths correctly.
10361036

Doc/library/pickle.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ general :mod:`pickle` should always be the preferred way to serialize Python
4242
objects. :mod:`marshal` exists primarily to support Python's :file:`.pyc`
4343
files.
4444

45-
The :mod:`pickle` module differs from :mod:`marshal` several significant ways:
45+
The :mod:`pickle` module differs from :mod:`marshal` in several significant ways:
4646

4747
* The :mod:`pickle` module keeps track of the objects it has already serialized,
4848
so that later references to the same object won't be serialized again.

Doc/library/urllib.request.rst

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
:mod:`urllib.request` --- extensible library for opening URLs
1+
:mod:`urllib.request` --- Extensible library for opening URLs
22
=============================================================
33

44
.. module:: urllib.request
@@ -299,18 +299,19 @@ The following classes are provided:
299299
users for the required information on the controlling terminal. A subclass may
300300
override this method to support more appropriate behavior if needed.
301301

302-
The :class:`FancyURLopener` class offers one additional method that should be
303-
overloaded to provide the appropriate behavior:
302+
The :class:`FancyURLopener` class offers one additional method that should be
303+
overloaded to provide the appropriate behavior:
304304

305-
.. method:: prompt_user_passwd(host, realm)
305+
.. method:: prompt_user_passwd(host, realm)
306306

307-
Return information needed to authenticate the user at the given host in the
308-
specified security realm. The return value should be a tuple, ``(user,
309-
password)``, which can be used for basic authentication.
307+
Return information needed to authenticate the user at the given host in the
308+
specified security realm. The return value should be a tuple, ``(user,
309+
password)``, which can be used for basic authentication.
310+
311+
The implementation prompts for this information on the terminal; an application
312+
should override this method to use an appropriate interaction model in the local
313+
environment.
310314

311-
The implementation prompts for this information on the terminal; an application
312-
should override this method to use an appropriate interaction model in the local
313-
environment.
314315

315316
.. class:: OpenerDirector()
316317

@@ -1249,8 +1250,8 @@ The following example uses no proxies at all, overriding environment settings::
12491250

12501251

12511252

1252-
:mod:`urllib.response` --- Response classes used by urllib.
1253-
===========================================================
1253+
:mod:`urllib.response` --- Response classes used by urllib
1254+
==========================================================
12541255

12551256
.. module:: urllib.response
12561257
:synopsis: Response classes used by urllib.

Doc/library/zipfile.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ ZipFile Objects
163163
.. note::
164164

165165
The file-like object is read-only and provides the following methods:
166-
:meth:`read`, :meth:`readline`, :meth:`readlines`, :meth:`__iter__`,
167-
:meth:`__next__`.
166+
:meth:`!read`, :meth:`!readline`, :meth:`!readlines`, :meth:`!__iter__`,
167+
:meth:`!__next__`.
168168

169169
.. note::
170170

0 commit comments

Comments
 (0)