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

Skip to content

Commit a833206

Browse files
committed
Merged revisions 74745 via svnmerge from
svn+ssh://[email protected]/python/branches/py3k ................ r74745 | benjamin.peterson | 2009-09-11 17:24:02 -0500 (Fri, 11 Sep 2009) | 98 lines Merged revisions 74277,74321,74323,74326,74355,74465,74467,74488,74492,74513,74531,74549,74553,74625,74632,74643-74644,74647,74652,74666,74671,74727,74739 via svnmerge from svn+ssh://[email protected]/python/trunk ........ r74277 | sean.reifschneider | 2009-08-01 18:54:55 -0500 (Sat, 01 Aug 2009) | 3 lines - Issue #6624: yArg_ParseTuple with "s" format when parsing argument with NUL: Bogus TypeError detail string. ........ r74321 | guilherme.polo | 2009-08-05 11:51:41 -0500 (Wed, 05 Aug 2009) | 1 line Easier reference to find (at least while svn continues being used). ........ r74323 | guilherme.polo | 2009-08-05 18:48:26 -0500 (Wed, 05 Aug 2009) | 1 line Typo. ........ r74326 | jesse.noller | 2009-08-05 21:05:56 -0500 (Wed, 05 Aug 2009) | 1 line Fix issue 4660: spurious task_done errors in multiprocessing, remove doc note for from_address ........ r74355 | gregory.p.smith | 2009-08-12 12:02:37 -0500 (Wed, 12 Aug 2009) | 2 lines comment typo fix ........ r74465 | vinay.sajip | 2009-08-15 18:23:12 -0500 (Sat, 15 Aug 2009) | 1 line Added section on logging to one file from multiple processes. ........ r74467 | vinay.sajip | 2009-08-15 18:34:47 -0500 (Sat, 15 Aug 2009) | 1 line Refined section on logging to one file from multiple processes. ........ r74488 | vinay.sajip | 2009-08-17 08:14:37 -0500 (Mon, 17 Aug 2009) | 1 line Further refined section on logging to one file from multiple processes. ........ r74492 | r.david.murray | 2009-08-17 14:26:49 -0500 (Mon, 17 Aug 2009) | 2 lines Issue 6685: 'toupper' -> 'upper' in cgi doc example explanation. ........ r74513 | skip.montanaro | 2009-08-18 09:37:52 -0500 (Tue, 18 Aug 2009) | 1 line missing module ref (issue6723) ........ r74531 | vinay.sajip | 2009-08-20 17:04:32 -0500 (Thu, 20 Aug 2009) | 1 line Added section on exceptions raised during logging. ........ r74549 | benjamin.peterson | 2009-08-24 12:42:36 -0500 (Mon, 24 Aug 2009) | 1 line fix pdf building by teaching latex the right encoding package ........ r74553 | r.david.murray | 2009-08-26 20:04:59 -0500 (Wed, 26 Aug 2009) | 2 lines Remove leftover text from end of sentence. ........ r74625 | benjamin.peterson | 2009-09-01 17:27:57 -0500 (Tue, 01 Sep 2009) | 1 line remove the check that classmethod's argument is a callable ........ r74632 | georg.brandl | 2009-09-03 02:27:26 -0500 (Thu, 03 Sep 2009) | 1 line #6828: fix wrongly highlighted blocks. ........ r74643 | georg.brandl | 2009-09-04 01:59:20 -0500 (Fri, 04 Sep 2009) | 2 lines Issue #2666: Handle BROWSER environment variable properly for unknown browser names in the webbrowser module. ........ r74644 | georg.brandl | 2009-09-04 02:55:14 -0500 (Fri, 04 Sep 2009) | 1 line #5047: remove Monterey support from configure. ........ r74647 | georg.brandl | 2009-09-04 03:17:04 -0500 (Fri, 04 Sep 2009) | 2 lines Issue #5275: In Cookie's Cookie.load(), properly handle non-string arguments as documented. ........ r74652 | georg.brandl | 2009-09-04 06:25:37 -0500 (Fri, 04 Sep 2009) | 1 line #6756: add some info about the "acct" parameter. ........ r74666 | georg.brandl | 2009-09-05 04:04:09 -0500 (Sat, 05 Sep 2009) | 1 line #6841: remove duplicated word. ........ r74671 | georg.brandl | 2009-09-05 11:47:17 -0500 (Sat, 05 Sep 2009) | 1 line #6843: add link from filterwarnings to where the meaning of the arguments is covered. ........ r74727 | benjamin.peterson | 2009-09-08 18:04:22 -0500 (Tue, 08 Sep 2009) | 1 line #6865 fix ref counting in initialization of pwd module ........ r74739 | georg.brandl | 2009-09-11 02:55:20 -0500 (Fri, 11 Sep 2009) | 1 line Move function back to its section. ........ ................
1 parent 14f9f7d commit a833206

23 files changed

Lines changed: 5952 additions & 5076 deletions

Doc/conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,9 @@
151151
# Documents to append as an appendix to all manuals.
152152
latex_appendices = ['glossary', 'about', 'license', 'copyright']
153153

154+
# Get LaTeX to handle Unicode correctly
155+
latex_elements = {'inputenc': r'\usepackage[utf8x]{inputenc}'}
156+
154157
# Options for the coverage checker
155158
# --------------------------------
156159

Doc/distutils/builtdist.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -429,13 +429,6 @@ built-in functions in the installation script.
429429
also the configuration. For details refer to Microsoft's documentation of the
430430
:cfunc:`SHGetSpecialFolderPath` function.
431431

432-
Vista User Access Control (UAC)
433-
===============================
434-
435-
Starting with Python 2.6, bdist_wininst supports a :option:`--user-access-control`
436-
option. The default is 'none' (meaning no UAC handling is done), and other
437-
valid values are 'auto' (meaning prompt for UAC elevation if Python was
438-
installed for all users) and 'force' (meaning always prompt for elevation)
439432

440433
.. function:: create_shortcut(target, description, filename[, arguments[, workdir[, iconpath[, iconindex]]]])
441434

@@ -447,3 +440,12 @@ installed for all users) and 'force' (meaning always prompt for elevation)
447440
and *iconindex* is the index of the icon in the file *iconpath*. Again, for
448441
details consult the Microsoft documentation for the :class:`IShellLink`
449442
interface.
443+
444+
445+
Vista User Access Control (UAC)
446+
===============================
447+
448+
Starting with Python 2.6, bdist_wininst supports a :option:`--user-access-control`
449+
option. The default is 'none' (meaning no UAC handling is done), and other
450+
valid values are 'auto' (meaning prompt for UAC elevation if Python was
451+
installed for all users) and 'force' (meaning always prompt for elevation).

Doc/library/cgi.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ The problem with the code is that you should never expect that a client will
208208
provide valid input to your scripts. For example, if a curious user appends
209209
another ``user=foo`` pair to the query string, then the script would crash,
210210
because in this situation the ``getvalue("user")`` method call returns a list
211-
instead of a string. Calling the :meth:`toupper` method on a list is not valid
211+
instead of a string. Calling the :meth:`~str.upper` method on a list is not valid
212212
(since lists do not have a method of this name) and results in an
213213
:exc:`AttributeError` exception.
214214

Doc/library/constants.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ should not be used in programs.
6666

6767
Objects that when printed, print a message like "Use quit() or Ctrl-D
6868
(i.e. EOF) to exit", and when called, raise :exc:`SystemExit` with the
69-
specified exit code, and when .
69+
specified exit code.
7070

7171
.. data:: copyright
7272
license

Doc/library/ftplib.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ followed by ``lines`` for the text version or ``binary`` for the binary version.
140140
``'anonymous@'``. This function should be called only once for each instance,
141141
after a connection has been established; it should not be called at all if a
142142
host and user were given when the instance was created. Most FTP commands are
143-
only allowed after the client has logged in.
143+
only allowed after the client has logged in. The *acct* parameter supplies
144+
"accounting information"; few systems implement this.
144145

145146

146147
.. method:: FTP.abort()

Doc/library/logging.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,6 +1316,7 @@ When this script is run, the output should look something like this::
13161316
2008-01-18 14:49:54,033 d.e.f WARNING IP: 127.0.0.1 User: jim A message at WARNING level with 2 parameters
13171317

13181318

1319+
13191320
.. _network-logging:
13201321

13211322
Sending and receiving logging events across a network

Doc/library/multiprocessing.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,11 +1151,6 @@ their parent process exits. The manager classes are defined in the
11511151

11521152
Run the server in the current process.
11531153

1154-
.. method:: from_address(address, authkey)
1155-
1156-
A class method which creates a manager object referring to a pre-existing
1157-
server process which is using the given address and authentication key.
1158-
11591154
.. method:: get_server()
11601155

11611156
Returns a :class:`Server` object which represents the actual server under

Doc/library/stdtypes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1938,7 +1938,7 @@ pairs within braces, for example: ``{'jack': 4098, 'sjoerd': 4127}`` or ``{4098:
19381938

19391939
:meth:`update` accepts either another dictionary object or an iterable of
19401940
key/value pairs (as a tuple or other iterable of length two). If keyword
1941-
arguments are specified, the dictionary is then is updated with those
1941+
arguments are specified, the dictionary is then updated with those
19421942
key/value pairs: ``d.update(red=1, blue=2)``.
19431943

19441944
.. method:: values()

Doc/library/warnings.rst

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
:mod:`warnings` --- Warning control
32
===================================
43

@@ -131,16 +130,16 @@ the disposition of the match. Each entry is a tuple of the form (*action*,
131130
+---------------+----------------------------------------------+
132131

133132
* *message* is a string containing a regular expression that the warning message
134-
must match (the match is compiled to always be case-insensitive)
133+
must match (the match is compiled to always be case-insensitive).
135134

136135
* *category* is a class (a subclass of :exc:`Warning`) of which the warning
137-
category must be a subclass in order to match
136+
category must be a subclass in order to match.
138137

139138
* *module* is a string containing a regular expression that the module name must
140-
match (the match is compiled to be case-sensitive)
139+
match (the match is compiled to be case-sensitive).
141140

142141
* *lineno* is an integer that the line number where the warning occurred must
143-
match, or ``0`` to match all line numbers
142+
match, or ``0`` to match all line numbers.
144143

145144
Since the :exc:`Warning` class is derived from the built-in :exc:`Exception`
146145
class, to turn a warning into an error we simply raise ``category(message)``.
@@ -285,29 +284,32 @@ Available Functions
285284

286285
.. function:: formatwarning(message, category, filename, lineno[, line])
287286

288-
Format a warning the standard way. This returns a string which may contain
289-
embedded newlines and ends in a newline. *line* is
290-
a line of source code to be included in the warning message; if *line* is not supplied,
291-
:func:`formatwarning` will try to read the line specified by *filename* and *lineno*.
287+
Format a warning the standard way. This returns a string which may contain
288+
embedded newlines and ends in a newline. *line* is a line of source code to
289+
be included in the warning message; if *line* is not supplied,
290+
:func:`formatwarning` will try to read the line specified by *filename* and
291+
*lineno*.
292292

293293

294294
.. function:: filterwarnings(action[, message[, category[, module[, lineno[, append]]]]])
295295

296-
Insert an entry into the list of warnings filters. The entry is inserted at the
297-
front by default; if *append* is true, it is inserted at the end. This checks
298-
the types of the arguments, compiles the message and module regular expressions,
299-
and inserts them as a tuple in the list of warnings filters. Entries closer to
296+
Insert an entry into the list of :ref:`warnings filter specifications
297+
<warning-filter>`. The entry is inserted at the front by default; if
298+
*append* is true, it is inserted at the end. This checks the types of the
299+
arguments, compiles the *message* and *module* regular expressions, and
300+
inserts them as a tuple in the list of warnings filters. Entries closer to
300301
the front of the list override entries later in the list, if both match a
301302
particular warning. Omitted arguments default to a value that matches
302303
everything.
303304

304305

305306
.. function:: simplefilter(action[, category[, lineno[, append]]])
306307

307-
Insert a simple entry into the list of warnings filters. The meaning of the
308-
function parameters is as for :func:`filterwarnings`, but regular expressions
309-
are not needed as the filter inserted always matches any message in any module
310-
as long as the category and line number match.
308+
Insert a simple entry into the list of :ref:`warnings filter specifications
309+
<warning-filter>`. The meaning of the function parameters is as for
310+
:func:`filterwarnings`, but regular expressions are not needed as the filter
311+
inserted always matches any message in any module as long as the category and
312+
line number match.
311313

312314

313315
.. function:: resetwarnings()

Doc/tutorial/introduction.rst

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ convert a complex number to a real number. Use ``abs(z)`` to get its magnitude
150150
4.0
151151
>>> abs(a) # sqrt(a.real**2 + a.imag**2)
152152
5.0
153-
>>>
154153

155154
In interactive mode, the last printed expression is assigned to the variable
156155
``_``. This means that when you are using Python as a desk calculator, it is
@@ -164,7 +163,6 @@ somewhat easier to continue calculations, for example::
164163
113.0625
165164
>>> round(_, 2)
166165
113.06
167-
>>>
168166

169167
This variable should be treated as read-only by the user. Don't explicitly
170168
assign a value to it --- you would create an independent local variable with the
@@ -212,12 +210,32 @@ next line is a logical continuation of the line::
212210

213211
Note that newlines still need to be embedded in the string using ``\n``; the
214212
newline following the trailing backslash is discarded. This example would print
215-
the following::
213+
the following:
214+
215+
.. code-block:: text
216216
217217
This is a rather long string containing
218218
several lines of text just as you would do in C.
219219
Note that whitespace at the beginning of the line is significant.
220220
221+
Or, strings can be surrounded in a pair of matching triple-quotes: ``"""`` or
222+
``'''``. End of lines do not need to be escaped when using triple-quotes, but
223+
they will be included in the string. ::
224+
225+
print """
226+
Usage: thingy [OPTIONS]
227+
-h Display this usage message
228+
-H hostname Hostname to connect to
229+
"""
230+
231+
produces the following output:
232+
233+
.. code-block:: text
234+
235+
Usage: thingy [OPTIONS]
236+
-h Display this usage message
237+
-H hostname Hostname to connect to
238+
221239
If we make the string literal a "raw" string, ``\n`` sequences are not converted
222240
to newlines, but the backslash at the end of the line, and the newline character
223241
in the source, are both included in the string as data. Thus, the example::
@@ -227,7 +245,9 @@ in the source, are both included in the string as data. Thus, the example::
227245

228246
print(hello)
229247

230-
would print::
248+
would print:
249+
250+
.. code-block:: text
231251
232252
This is a rather long string containing\n\
233253
several lines of text much as you would do in C.

0 commit comments

Comments
 (0)