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

Skip to content

Commit 75edad0

Browse files
committed
Merged revisions 68116-68119,68121,68123-68127 via svnmerge from
svn+ssh://[email protected]/python/trunk ........ r68116 | georg.brandl | 2009-01-01 05:46:51 -0600 (Thu, 01 Jan 2009) | 2 lines #4100: note that element children are not necessarily present on "start" events. ........ r68117 | georg.brandl | 2009-01-01 05:53:55 -0600 (Thu, 01 Jan 2009) | 2 lines #4156: make clear that "protocol" is to be replaced with the protocol name. ........ r68118 | georg.brandl | 2009-01-01 06:00:19 -0600 (Thu, 01 Jan 2009) | 2 lines #4185: clarify escape behavior of replacement strings. ........ r68119 | georg.brandl | 2009-01-01 06:09:40 -0600 (Thu, 01 Jan 2009) | 3 lines #4222: document dis.findlabels() and dis.findlinestarts() and put them into dis.__all__. ........ r68121 | georg.brandl | 2009-01-01 06:43:33 -0600 (Thu, 01 Jan 2009) | 2 lines Point to types module in new module deprecation notice. ........ r68123 | georg.brandl | 2009-01-01 06:52:29 -0600 (Thu, 01 Jan 2009) | 2 lines #4784: ... on three counts ... ........ r68124 | georg.brandl | 2009-01-01 06:53:19 -0600 (Thu, 01 Jan 2009) | 2 lines #4782: Fix markup error that hid load() and loads(). ........ r68125 | georg.brandl | 2009-01-01 07:02:09 -0600 (Thu, 01 Jan 2009) | 2 lines #4776: add data_files and package_dir arguments. ........ r68126 | georg.brandl | 2009-01-01 07:05:13 -0600 (Thu, 01 Jan 2009) | 2 lines Handlers are in the `logging.handlers` module. ........ r68127 | georg.brandl | 2009-01-01 07:14:49 -0600 (Thu, 01 Jan 2009) | 2 lines #4767: Use correct submodules for all MIME classes. ........
1 parent da10d3b commit 75edad0

9 files changed

Lines changed: 62 additions & 10 deletions

File tree

Doc/distutils/apiref.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,23 @@ setup script). Indirectly provides the :class:`distutils.dist.Distribution` and
8888
| *options* | default options for the setup | a string |
8989
| | script | |
9090
+--------------------+--------------------------------+-------------------------------------------------------------+
91-
| *license* | The license for the package | |
91+
| *license* | The license for the package | a string |
9292
+--------------------+--------------------------------+-------------------------------------------------------------+
93-
| *keywords* | Descriptive meta-data. See | |
93+
| *keywords* | Descriptive meta-data, see | |
9494
| | :pep:`314` | |
9595
+--------------------+--------------------------------+-------------------------------------------------------------+
9696
| *platforms* | | |
9797
+--------------------+--------------------------------+-------------------------------------------------------------+
9898
| *cmdclass* | A mapping of command names to | a dictionary |
9999
| | :class:`Command` subclasses | |
100100
+--------------------+--------------------------------+-------------------------------------------------------------+
101+
| *data_files* | A list of data files to | a list |
102+
| | install | |
103+
+--------------------+--------------------------------+-------------------------------------------------------------+
104+
| *package_dir* | A mapping of package to | a dictionary |
105+
| | directory names | |
106+
+--------------------+--------------------------------+-------------------------------------------------------------+
107+
101108

102109

103110
.. function:: run_setup(script_name[, script_args=None, stop_after='run'])

Doc/library/dis.rst

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,23 @@ The :mod:`dis` module defines the following functions and constants:
6464

6565
.. function:: disco(code[, lasti])
6666

67-
A synonym for disassemble. It is more convenient to type, and kept for
68-
compatibility with earlier Python releases.
67+
A synonym for :func:`disassemble`. It is more convenient to type, and kept
68+
for compatibility with earlier Python releases.
6969

7070

71+
.. function:: findlinestarts(code)
72+
73+
This generator function uses the ``co_firstlineno`` and ``co_lnotab``
74+
attributes of the code object *code* to find the offsets which are starts of
75+
lines in the source code. They are generated as ``(offset, lineno)`` pairs.
76+
77+
78+
.. function:: findlabels(code)
79+
80+
Detect all offsets in the code object *code* which are jump targets, and
81+
return a list of these offsets.
82+
83+
7184
.. data:: opname
7285

7386
Sequence of operation names, indexable using the bytecode.

Doc/library/email.mime.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ things easier.
1919

2020
Here are the classes:
2121

22+
.. currentmodule:: email.mime.base
2223

2324
.. class:: MIMEBase(_maintype, _subtype, **_params)
2425

@@ -39,6 +40,8 @@ Here are the classes:
3940
:mailheader:`MIME-Version` header (always set to ``1.0``).
4041

4142

43+
.. currentmodule:: email.mime.nonmultipart
44+
4245
.. class:: MIMENonMultipart()
4346

4447
Module: :mod:`email.mime.nonmultipart`
@@ -50,6 +53,8 @@ Here are the classes:
5053
:exc:`MultipartConversionError` exception is raised.
5154

5255

56+
.. currentmodule:: email.mime.multipart
57+
5358
.. class:: MIMEMultipart([subtype[, boundary[, _subparts[, _params]]]])
5459

5560
Module: :mod:`email.mime.multipart`
@@ -73,6 +78,8 @@ Here are the classes:
7378
dictionary.
7479

7580

81+
.. currentmodule:: email.mime.application
82+
7683
.. class:: MIMEApplication(_data[, _subtype[, _encoder[, **_params]]])
7784

7885
Module: :mod:`email.mime.application`
@@ -93,6 +100,8 @@ Here are the classes:
93100
*_params* are passed straight through to the base class constructor.
94101

95102

103+
.. currentmodule:: email.mime.audio
104+
96105
.. class:: MIMEAudio(_audiodata[, _subtype[, _encoder[, **_params]]])
97106

98107
Module: :mod:`email.mime.audio`
@@ -116,6 +125,8 @@ Here are the classes:
116125
*_params* are passed straight through to the base class constructor.
117126

118127

128+
.. currentmodule:: email.mime.image
129+
119130
.. class:: MIMEImage(_imagedata[, _subtype[, _encoder[, **_params]]])
120131

121132
Module: :mod:`email.mime.image`
@@ -139,6 +150,8 @@ Here are the classes:
139150
*_params* are passed straight through to the :class:`MIMEBase` constructor.
140151

141152

153+
.. currentmodule:: email.mime.message
154+
142155
.. class:: MIMEMessage(_msg[, _subtype])
143156

144157
Module: :mod:`email.mime.message`
@@ -152,6 +165,8 @@ Here are the classes:
152165
:mimetype:`rfc822`.
153166

154167

168+
.. currentmodule:: email.mime.text
169+
155170
.. class:: MIMEText(_text[, _subtype[, _charset]])
156171

157172
Module: :mod:`email.mime.text`

Doc/library/json.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ Basic Usage
165165
:func:`dump`.
166166

167167

168-
.. function load(fp[, encoding[, cls[, object_hook[, parse_float[, parse_int[, parse_constant[, **kw]]]]]]])
168+
.. function:: load(fp[, encoding[, cls[, object_hook[, parse_float[, parse_int[, parse_constant[, **kw]]]]]]])
169169

170170
Deserialize *fp* (a ``.read()``-supporting file-like object containing a JSON
171171
document) to a Python object.
@@ -201,7 +201,7 @@ Basic Usage
201201
class.
202202

203203

204-
.. function loads(s[, encoding[, cls[, object_hook[, parse_float[, parse_int[, parse_constant[, **kw]]]]]]])
204+
.. function:: loads(s[, encoding[, cls[, object_hook[, parse_float[, parse_int[, parse_constant[, **kw]]]]]]])
205205

206206
Deserialize *s* (a :class:`str` or :class:`unicode` instance containing a JSON
207207
document) to a Python object.

Doc/library/logging.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,6 +1534,8 @@ subclasses. However, the :meth:`__init__` method in subclasses needs to call
15341534
StreamHandler
15351535
^^^^^^^^^^^^^
15361536

1537+
.. module:: logging.handlers
1538+
15371539
The :class:`StreamHandler` class, located in the core :mod:`logging` package,
15381540
sends logging output to streams such as *sys.stdout*, *sys.stderr* or any
15391541
file-like object (or, more precisely, any object which supports :meth:`write`
@@ -2035,6 +2037,8 @@ supports sending logging messages to a Web server, using either ``GET`` or
20352037
Formatter Objects
20362038
-----------------
20372039

2040+
.. currentmodule:: logging
2041+
20382042
:class:`Formatter`\ s have the following attributes and methods. They are
20392043
responsible for converting a :class:`LogRecord` to (usually) a string which can
20402044
be interpreted by either a human or an external system. The base

Doc/library/webbrowser.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ Here are some simple examples::
167167
Browser Controller Objects
168168
--------------------------
169169

170-
Browser controllers provide two methods which parallel two of the module-level
170+
Browser controllers provide these methods which parallel two of the module-level
171171
convenience functions:
172172

173173

Doc/library/xml.etree.elementtree.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,16 @@ Functions
9494
*events* is a list of events to report back. If omitted, only "end" events are
9595
reported. Returns an :term:`iterator` providing ``(event, elem)`` pairs.
9696

97+
.. note::
98+
99+
:func:`iterparse` only guarantees that it has seen the ">"
100+
character of a starting tag when it emits a "start" event, so the
101+
attributes are defined, but the contents of the text and tail attributes
102+
are undefined at that point. The same applies to the element children;
103+
they may or may not be present.
104+
105+
If you need a fully populated element, look for "end" events instead.
106+
97107

98108
.. function:: parse(source[, parser])
99109

Lib/dis.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
from opcode import *
77
from opcode import __all__ as _opcodes_all
88

9-
__all__ = ["dis","disassemble","distb","disco"] + _opcodes_all
9+
__all__ = ["dis", "disassemble", "distb", "disco",
10+
"findlinestarts", "findlabels"] + _opcodes_all
1011
del _opcodes_all
1112

1213
def dis(x=None):

Lib/re.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ def sub(pattern, repl, string, count=0):
160160
"""Return the string obtained by replacing the leftmost
161161
non-overlapping occurrences of the pattern in string by the
162162
replacement repl. repl can be either a string or a callable;
163-
if a callable, it's passed the match object and must return
163+
if a string, backslash escapes in it are processed. If it is
164+
a callable, it's passed the match object and must return
164165
a replacement string to be used."""
165166
return _compile(pattern, 0).sub(repl, string, count)
166167

@@ -170,7 +171,8 @@ def subn(pattern, repl, string, count=0):
170171
non-overlapping occurrences of the pattern in the source
171172
string by the replacement repl. number is the number of
172173
substitutions that were made. repl can be either a string or a
173-
callable; if a callable, it's passed the match object and must
174+
callable; if a string, backslash escapes in it are processed.
175+
If it is a callable, it's passed the match object and must
174176
return a replacement string to be used."""
175177
return _compile(pattern, 0).subn(repl, string, count)
176178

0 commit comments

Comments
 (0)