summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-07-02 20:22:54 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-07-02 20:22:54 (GMT)
commit4118174315f4cba03208886af868fe31f1cd5b9d (patch)
tree9c06a3317ab82fbce405303931226e6cb3e6fbdb /Doc
parent200ff1853b43a0f0c907705ca8250ffe2539ba77 (diff)
downloadcpython-4118174315f4cba03208886af868fe31f1cd5b9d.zip
cpython-4118174315f4cba03208886af868fe31f1cd5b9d.tar.gz
cpython-4118174315f4cba03208886af868fe31f1cd5b9d.tar.bz2
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 #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. ........
Diffstat (limited to 'Doc')
-rw-r--r--Doc/Makefile8
-rw-r--r--Doc/glossary.rst15
-rw-r--r--Doc/library/abc.rst8
-rw-r--r--Doc/library/collections.rst4
-rw-r--r--Doc/library/msilib.rst9
-rw-r--r--Doc/library/rlcompleter.rst6
-rw-r--r--Doc/library/subprocess.rst4
-rw-r--r--Doc/reference/compound_stmts.rst8
-rw-r--r--Doc/reference/expressions.rst6
9 files changed, 43 insertions, 25 deletions
diff --git a/Doc/Makefile b/Doc/Makefile
index c1abe11..470337b 100644
--- a/Doc/Makefile
+++ b/Doc/Makefile
@@ -33,15 +33,15 @@ checkout:
fi
@if [ ! -d tools/docutils ]; then \
echo "Checking out Docutils..."; \
- svn checkout $(SVNROOT)/external/docutils-0.4/docutils tools/docutils; \
+ svn checkout $(SVNROOT)/external/docutils-0.5/docutils tools/docutils; \
fi
@if [ ! -d tools/jinja ]; then \
echo "Checking out Jinja..."; \
- svn checkout $(SVNROOT)/external/Jinja-1.1/jinja tools/jinja; \
+ svn checkout $(SVNROOT)/external/Jinja-1.2/jinja tools/jinja; \
fi
@if [ ! -d tools/pygments ]; then \
echo "Checking out Pygments..."; \
- svn checkout $(SVNROOT)/external/Pygments-0.9/pygments tools/pygments; \
+ svn checkout $(SVNROOT)/external/Pygments-0.10/pygments tools/pygments; \
fi
update: checkout
@@ -103,6 +103,8 @@ pydoc-topics: build
@echo "Building finished; now copy build/pydoc-topics/pydoc_topics.py " \
"into the Lib/ directory"
+htmlview: html
+ $(PYTHON) -c "import webbrowser; webbrowser.open('build/html/index.html')"
clean:
-rm -rf build/*
-rm -rf tools/sphinx
diff --git a/Doc/glossary.rst b/Doc/glossary.rst
index cd8b7ac..3caa36e 100644
--- a/Doc/glossary.rst
+++ b/Doc/glossary.rst
@@ -16,6 +16,14 @@ Glossary
The typical Python prompt of the interactive shell when entering code for
an indented code block.
+ Abstract Base Class
+ Abstract Base Classes (abbreviated ABCs) complement :term:`duck-typing` by
+ providing a way to define interfaces when other techniques like :func:`hasattr`
+ would be clumsy. Python comes with many builtin ABCs for data structures
+ (in the :mod:`collections` module), numbers (in the :mod:`numbers`
+ module), and streams (in the :mod:`io` module). You can create your own
+ ABC with the :mod:`abc` module.
+
argument
A value passed to a function or method, assigned to a name local to
the body. A function or method may have both positional arguments and
@@ -93,15 +101,16 @@ Glossary
be any object with a :meth:`__hash__` function, not just integers starting
from zero. Called a hash in Perl.
- duck-typing
+ duck-typing
Pythonic programming style that determines an object's type by inspection
of its method or attribute signature rather than by explicit relationship
to some type object ("If it looks like a duck and quacks like a duck, it
must be a duck.") By emphasizing interfaces rather than specific types,
well-designed code improves its flexibility by allowing polymorphic
substitution. Duck-typing avoids tests using :func:`type` or
- :func:`isinstance`. Instead, it typically employs :func:`hasattr` tests or
- :term:`EAFP` programming.
+ :func:`isinstance`. (Note, however, that duck-typing can be complemented
+ with abstract base classes.) Instead, it typically employs :func:`hasattr`
+ tests or :term:`EAFP` programming.
EAFP
Easier to ask for forgiveness than permission. This common Python coding
diff --git a/Doc/library/abc.rst b/Doc/library/abc.rst
index f1a6c06..21d3018 100644
--- a/Doc/library/abc.rst
+++ b/Doc/library/abc.rst
@@ -8,10 +8,10 @@
.. sectionauthor:: Georg Brandl
.. much of the content adapted from docstrings
-This module provides the infrastructure for defining abstract base classes
-(ABCs) in Python, as outlined in :pep:`3119`; see the PEP for why this was added
-to Python. (See also :pep:`3141` and the :mod:`numbers` module regarding a type
-hierarchy for numbers based on ABCs.)
+This module provides the infrastructure for defining :term:`abstract base
+classes` (ABCs) in Python, as outlined in :pep:`3119`; see the PEP for why this
+was added to Python. (See also :pep:`3141` and the :mod:`numbers` module
+regarding a type hierarchy for numbers based on ABCs.)
The :mod:`collections` module has some concrete classes that derive from
ABCs; these can, of course, be further derived. In addition the
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst
index 3203ca5..7718c51 100644
--- a/Doc/library/collections.rst
+++ b/Doc/library/collections.rst
@@ -520,8 +520,8 @@ Example:
raise ValueError('Got unexpected field names: %r' % kwds.keys())
return result
<BLANKLINE>
- def __getnewargs__(self):
- return tuple(self)
+ def __getnewargs__(self):
+ return tuple(self)
<BLANKLINE>
x = property(itemgetter(0))
y = property(itemgetter(1))
diff --git a/Doc/library/msilib.rst b/Doc/library/msilib.rst
index eb58d44..d0a53d7 100644
--- a/Doc/library/msilib.rst
+++ b/Doc/library/msilib.rst
@@ -1,4 +1,3 @@
-
:mod:`msilib` --- Read and write Microsoft Installer files
==========================================================
@@ -163,11 +162,11 @@ View Objects
------------
-.. method:: View.Execute([params=None])
+.. method:: View.Execute(params)
- Execute the SQL query of the view, through :cfunc:`MSIViewExecute`. *params* is
- an optional record describing actual values of the parameter tokens in the
- query.
+ Execute the SQL query of the view, through :cfunc:`MSIViewExecute`. If
+ *params* is not ``None``, it is a record describing actual values of the
+ parameter tokens in the query.
.. method:: View.GetColumnInfo(kind)
diff --git a/Doc/library/rlcompleter.rst b/Doc/library/rlcompleter.rst
index 01efb03..b09df54 100644
--- a/Doc/library/rlcompleter.rst
+++ b/Doc/library/rlcompleter.rst
@@ -20,9 +20,9 @@ Example::
>>> import readline
>>> readline.parse_and_bind("tab: complete")
>>> readline. <TAB PRESSED>
- readline.__doc__ readline.get_line_buffer readline.read_init_file
- readline.__file__ readline.insert_text readline.set_completer
- readline.__name__ readline.parse_and_bind
+ readline.__doc__ readline.get_line_buffer( readline.read_init_file(
+ readline.__file__ readline.insert_text( readline.set_completer(
+ readline.__name__ readline.parse_and_bind(
>>> readline.
The :mod:`rlcompleter` module is designed for use with Python's interactive
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
index ba2a5a1..daa88b3 100644
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -18,6 +18,10 @@ replace several other, older modules and functions, such as::
Information about how the :mod:`subprocess` module can be used to replace these
modules and functions can be found in the following sections.
+.. seealso::
+
+ :pep:`324` -- PEP proposing the subprocess module
+
Using the subprocess Module
---------------------------
diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst
index c5b949e..a3665e7 100644
--- a/Doc/reference/compound_stmts.rst
+++ b/Doc/reference/compound_stmts.rst
@@ -583,10 +583,10 @@ variables with different implementation details.
:pep:`3129` - Class Decorators
-Class definitions, like function definitions, may be wrapped by one or
-more :term:`decorator` expressions. The evaluation rules for the
-decorator expressions are the same as for functions. The result must
-be a class object, which is then bound to the class name.
+Class definitions, like function definitions, may be wrapped by one or more
+:term:`decorator` expressions. The evaluation rules for the decorator
+expressions are the same as for functions. The result must be a class object,
+which is then bound to the class name.
.. rubric:: Footnotes
diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst
index af79e53..e205e42 100644
--- a/Doc/reference/expressions.rst
+++ b/Doc/reference/expressions.rst
@@ -1082,7 +1082,7 @@ The operator :keyword:`not in` is defined to have the inverse true value of
The operators :keyword:`is` and :keyword:`is not` test for object identity: ``x
is y`` is true if and only if *x* and *y* are the same object. ``x is not y``
-yields the inverse truth value.
+yields the inverse truth value. [#]_
.. _booleans:
@@ -1314,3 +1314,7 @@ groups from right to left).
identity only, but this caused surprises because people expected to be able
to test a dictionary for emptiness by comparing it to ``{}``.
+.. [#] Due to automatic garbage-collection, free lists, and the dynamic nature of
+ descriptors, you may notice seemingly unusual behaviour in certain uses of
+ the :keyword:`is` operator, like those involving comparisons between instance
+ methods, or constants. Check their documentation for more info.