Skip to content

Commit 4118174

Browse files
committed
Merged revisions 64475,64544-64545,64550,64557-64558,64565,64570,64577,64582-64583,64585,64590,64592-64593,64625,64630,64638,64647,64655-64656,64663-64664 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r64475 | raymond.hettinger | 2008-06-22 22:29:28 -0500 (Sun, 22 Jun 2008) | 1 line Issue 3161: Missing import and test. ........ r64544 | georg.brandl | 2008-06-26 16:12:55 -0500 (Thu, 26 Jun 2008) | 2 lines Use newer versions of externals. ........ r64545 | benjamin.peterson | 2008-06-26 16:23:30 -0500 (Thu, 26 Jun 2008) | 1 line add a htmlview directive ........ r64550 | brett.cannon | 2008-06-26 19:32:16 -0500 (Thu, 26 Jun 2008) | 2 lines Ignore .pyc and .pyo files. ........ r64557 | mark.dickinson | 2008-06-27 05:11:52 -0500 (Fri, 27 Jun 2008) | 3 lines Remove trailing 'L's from numerator and denominator in the repr() of a Fraction instance. ........ r64558 | mark.dickinson | 2008-06-27 06:03:21 -0500 (Fri, 27 Jun 2008) | 2 lines Add Jean Brouwers for his work on math.sum ........ r64565 | raymond.hettinger | 2008-06-27 16:34:24 -0500 (Fri, 27 Jun 2008) | 1 line Fix whitespace in example code. ........ r64570 | hyeshik.chang | 2008-06-27 20:04:31 -0500 (Fri, 27 Jun 2008) | 8 lines Give information for compililation of _multiprocessing.SemLock on FreeBSD: FreeBSD's P1003.1b semaphore support is highly experimental and it's disabled by default. Even if a user loads the experimental kernel module manually, _multiprocessing doesn't work correctly due to several known incompatibilities around sem_unlink and sem_getvalue, yet. ........ r64577 | raymond.hettinger | 2008-06-28 17:16:53 -0500 (Sat, 28 Jun 2008) | 1 line Issue 3230: Do not the set specific size macro. ........ r64582 | benjamin.peterson | 2008-06-28 18:06:05 -0500 (Sat, 28 Jun 2008) | 2 lines convert test_audioop to unittest. Thanks to Giampaolo Rodola. ........ r64583 | benjamin.peterson | 2008-06-28 18:06:49 -0500 (Sat, 28 Jun 2008) | 1 line rewrap ........ r64585 | benjamin.peterson | 2008-06-28 18:35:31 -0500 (Sat, 28 Jun 2008) | 1 line fix typo ........ r64590 | benjamin.peterson | 2008-06-29 08:43:07 -0500 (Sun, 29 Jun 2008) | 1 line reinstate the ending backtick. thanks Nick :) ........ r64592 | vinay.sajip | 2008-06-29 16:25:28 -0500 (Sun, 29 Jun 2008) | 2 lines Removed out-of-date comment in _install_handlers and used issubclass in place of equality comparison of classes. ........ r64593 | vinay.sajip | 2008-06-29 16:27:15 -0500 (Sun, 29 Jun 2008) | 1 line Updated to reflect change in logging.config to remove out-of-date comment in _install_handlers and the use of issubclass in place of equality comparison of classes. ........ r64625 | georg.brandl | 2008-07-01 14:59:00 -0500 (Tue, 01 Jul 2008) | 2 lines Add a link to PEP 324. ........ r64630 | georg.brandl | 2008-07-01 15:18:10 -0500 (Tue, 01 Jul 2008) | 2 lines python#3216: fix Execute's parameter description. ........ r64638 | georg.brandl | 2008-07-01 15:50:02 -0500 (Tue, 01 Jul 2008) | 2 lines #1410739: add a footnote about "is" and "unusual" behavior. ........ r64647 | benjamin.peterson | 2008-07-01 18:33:06 -0500 (Tue, 01 Jul 2008) | 1 line add ABC to the glossary ........ r64655 | mark.dickinson | 2008-07-02 04:37:01 -0500 (Wed, 02 Jul 2008) | 7 lines Replace occurrences of '\d' with '[0-9]' in Decimal regex, to make sure that the behaviour of Decimal doesn't change if/when re.UNICODE becomes assumed in Python 3.0. Also add a check that alternative Unicode digits (e.g. u'\N{FULLWIDTH DIGIT ONE}') are *not* accepted in a numeric string. ........ r64656 | nick.coghlan | 2008-07-02 08:09:19 -0500 (Wed, 02 Jul 2008) | 1 line Issue 3190: pydoc now hides module __package__ attributes ........ r64663 | jesse.noller | 2008-07-02 11:44:09 -0500 (Wed, 02 Jul 2008) | 1 line Reenable the manager tests with Amaury's threading fix ........ r64664 | facundo.batista | 2008-07-02 11:52:55 -0500 (Wed, 02 Jul 2008) | 4 lines Issue #449227: Now with the rlcompleter module, callable objects are added a '(' when completed. ........
1 parent 200ff18 commit 4118174

24 files changed

Lines changed: 271 additions & 333 deletions

‎Doc/Makefile‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ checkout:
3333
fi
3434
@if [ ! -d tools/docutils ]; then \
3535
echo "Checking out Docutils..."; \
36-
svn checkout $(SVNROOT)/external/docutils-0.4/docutils tools/docutils; \
36+
svn checkout $(SVNROOT)/external/docutils-0.5/docutils tools/docutils; \
3737
fi
3838
@if [ ! -d tools/jinja ]; then \
3939
echo "Checking out Jinja..."; \
40-
svn checkout $(SVNROOT)/external/Jinja-1.1/jinja tools/jinja; \
40+
svn checkout $(SVNROOT)/external/Jinja-1.2/jinja tools/jinja; \
4141
fi
4242
@if [ ! -d tools/pygments ]; then \
4343
echo "Checking out Pygments..."; \
44-
svn checkout $(SVNROOT)/external/Pygments-0.9/pygments tools/pygments; \
44+
svn checkout $(SVNROOT)/external/Pygments-0.10/pygments tools/pygments; \
4545
fi
4646

4747
update: checkout
@@ -103,6 +103,8 @@ pydoc-topics: build
103103
@echo "Building finished; now copy build/pydoc-topics/pydoc_topics.py " \
104104
"into the Lib/ directory"
105105

106+
htmlview: html
107+
$(PYTHON) -c "import webbrowser; webbrowser.open('build/html/index.html')"
106108
clean:
107109
-rm -rf build/*
108110
-rm -rf tools/sphinx

‎Doc/glossary.rst‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ Glossary
1616
The typical Python prompt of the interactive shell when entering code for
1717
an indented code block.
1818

19+
Abstract Base Class
20+
Abstract Base Classes (abbreviated ABCs) complement :term:`duck-typing` by
21+
providing a way to define interfaces when other techniques like :func:`hasattr`
22+
would be clumsy. Python comes with many builtin ABCs for data structures
23+
(in the :mod:`collections` module), numbers (in the :mod:`numbers`
24+
module), and streams (in the :mod:`io` module). You can create your own
25+
ABC with the :mod:`abc` module.
26+
1927
argument
2028
A value passed to a function or method, assigned to a name local to
2129
the body. A function or method may have both positional arguments and
@@ -93,15 +101,16 @@ Glossary
93101
be any object with a :meth:`__hash__` function, not just integers starting
94102
from zero. Called a hash in Perl.
95103

96-
duck-typing
104+
duck-typing
97105
Pythonic programming style that determines an object's type by inspection
98106
of its method or attribute signature rather than by explicit relationship
99107
to some type object ("If it looks like a duck and quacks like a duck, it
100108
must be a duck.") By emphasizing interfaces rather than specific types,
101109
well-designed code improves its flexibility by allowing polymorphic
102110
substitution. Duck-typing avoids tests using :func:`type` or
103-
:func:`isinstance`. Instead, it typically employs :func:`hasattr` tests or
104-
:term:`EAFP` programming.
111+
:func:`isinstance`. (Note, however, that duck-typing can be complemented
112+
with abstract base classes.) Instead, it typically employs :func:`hasattr`
113+
tests or :term:`EAFP` programming.
105114

106115
EAFP
107116
Easier to ask for forgiveness than permission. This common Python coding

‎Doc/library/abc.rst‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
.. sectionauthor:: Georg Brandl
99
.. much of the content adapted from docstrings
1010
11-
This module provides the infrastructure for defining abstract base classes
12-
(ABCs) in Python, as outlined in :pep:`3119`; see the PEP for why this was added
13-
to Python. (See also :pep:`3141` and the :mod:`numbers` module regarding a type
14-
hierarchy for numbers based on ABCs.)
11+
This module provides the infrastructure for defining :term:`abstract base
12+
classes` (ABCs) in Python, as outlined in :pep:`3119`; see the PEP for why this
13+
was added to Python. (See also :pep:`3141` and the :mod:`numbers` module
14+
regarding a type hierarchy for numbers based on ABCs.)
1515

1616
The :mod:`collections` module has some concrete classes that derive from
1717
ABCs; these can, of course, be further derived. In addition the

‎Doc/library/collections.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,8 +520,8 @@ Example:
520520
raise ValueError('Got unexpected field names: %r' % kwds.keys())
521521
return result
522522
<BLANKLINE>
523-
def __getnewargs__(self):
524-
return tuple(self)
523+
def __getnewargs__(self):
524+
return tuple(self)
525525
<BLANKLINE>
526526
x = property(itemgetter(0))
527527
y = property(itemgetter(1))

‎Doc/library/msilib.rst‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
:mod:`msilib` --- Read and write Microsoft Installer files
32
==========================================================
43

@@ -163,11 +162,11 @@ View Objects
163162
------------
164163

165164

166-
.. method:: View.Execute([params=None])
165+
.. method:: View.Execute(params)
167166

168-
Execute the SQL query of the view, through :cfunc:`MSIViewExecute`. *params* is
169-
an optional record describing actual values of the parameter tokens in the
170-
query.
167+
Execute the SQL query of the view, through :cfunc:`MSIViewExecute`. If
168+
*params* is not ``None``, it is a record describing actual values of the
169+
parameter tokens in the query.
171170

172171

173172
.. method:: View.GetColumnInfo(kind)

‎Doc/library/rlcompleter.rst‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ Example::
2020
>>> import readline
2121
>>> readline.parse_and_bind("tab: complete")
2222
>>> readline. <TAB PRESSED>
23-
readline.__doc__ readline.get_line_buffer readline.read_init_file
24-
readline.__file__ readline.insert_text readline.set_completer
25-
readline.__name__ readline.parse_and_bind
23+
readline.__doc__ readline.get_line_buffer( readline.read_init_file(
24+
readline.__file__ readline.insert_text( readline.set_completer(
25+
readline.__name__ readline.parse_and_bind(
2626
>>> readline.
2727

2828
The :mod:`rlcompleter` module is designed for use with Python's interactive

‎Doc/library/subprocess.rst‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ replace several other, older modules and functions, such as::
1818
Information about how the :mod:`subprocess` module can be used to replace these
1919
modules and functions can be found in the following sections.
2020

21+
.. seealso::
22+
23+
:pep:`324` -- PEP proposing the subprocess module
24+
2125

2226
Using the subprocess Module
2327
---------------------------

‎Doc/reference/compound_stmts.rst‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -583,10 +583,10 @@ variables with different implementation details.
583583

584584
:pep:`3129` - Class Decorators
585585

586-
Class definitions, like function definitions, may be wrapped by one or
587-
more :term:`decorator` expressions. The evaluation rules for the
588-
decorator expressions are the same as for functions. The result must
589-
be a class object, which is then bound to the class name.
586+
Class definitions, like function definitions, may be wrapped by one or more
587+
:term:`decorator` expressions. The evaluation rules for the decorator
588+
expressions are the same as for functions. The result must be a class object,
589+
which is then bound to the class name.
590590

591591

592592
.. rubric:: Footnotes

‎Doc/reference/expressions.rst‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1082,7 +1082,7 @@ The operator :keyword:`not in` is defined to have the inverse true value of
10821082

10831083
The operators :keyword:`is` and :keyword:`is not` test for object identity: ``x
10841084
is y`` is true if and only if *x* and *y* are the same object. ``x is not y``
1085-
yields the inverse truth value.
1085+
yields the inverse truth value. [#]_
10861086

10871087

10881088
.. _booleans:
@@ -1314,3 +1314,7 @@ groups from right to left).
13141314
identity only, but this caused surprises because people expected to be able
13151315
to test a dictionary for emptiness by comparing it to ``{}``.
13161316
1317+
.. [#] Due to automatic garbage-collection, free lists, and the dynamic nature of
1318+
descriptors, you may notice seemingly unusual behaviour in certain uses of
1319+
the :keyword:`is` operator, like those involving comparisons between instance
1320+
methods, or constants. Check their documentation for more info.

‎Lib/_abcoll.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"""
1010

1111
from abc import ABCMeta, abstractmethod
12+
import sys
1213

1314
__all__ = ["Hashable", "Iterable", "Iterator",
1415
"Sized", "Container", "Callable",

0 commit comments

Comments
 (0)