[Python-checkins] r86486 - in python/branches/py3k/Doc/library: ast.rst atexit.rst bisect.rst calendar.rst cmd.rst collections.rst contextlib.rst dis.rst filecmp.rst fileinput.rst fnmatch.rst functools.rst glob.rst heapq.rst keyword.rst linecache.rst pprint.rst queue.rst quopri.rst random.rst sched.rst shelve.rst shutil.rst string.rst textwrap.rst threading.rst tokenize.rst trace.rst uu.rst
eric.araujo
python-checkins at python.org
Tue Nov 16 20:13:50 CET 2010
Author: eric.araujo
Date: Tue Nov 16 20:13:50 2010
New Revision: 86486
Log:
Provide links to Python source where the code is short, readable and
informative adjunct to the docs. Forward-port of Raymond's r86225 and
r86245 using the new source reST role added in #10334.
Modified:
python/branches/py3k/Doc/library/ast.rst
python/branches/py3k/Doc/library/atexit.rst
python/branches/py3k/Doc/library/bisect.rst
python/branches/py3k/Doc/library/calendar.rst
python/branches/py3k/Doc/library/cmd.rst
python/branches/py3k/Doc/library/collections.rst
python/branches/py3k/Doc/library/contextlib.rst
python/branches/py3k/Doc/library/dis.rst
python/branches/py3k/Doc/library/filecmp.rst
python/branches/py3k/Doc/library/fileinput.rst
python/branches/py3k/Doc/library/fnmatch.rst
python/branches/py3k/Doc/library/functools.rst
python/branches/py3k/Doc/library/glob.rst
python/branches/py3k/Doc/library/heapq.rst
python/branches/py3k/Doc/library/keyword.rst
python/branches/py3k/Doc/library/linecache.rst
python/branches/py3k/Doc/library/pprint.rst
python/branches/py3k/Doc/library/queue.rst
python/branches/py3k/Doc/library/quopri.rst
python/branches/py3k/Doc/library/random.rst
python/branches/py3k/Doc/library/sched.rst
python/branches/py3k/Doc/library/shelve.rst
python/branches/py3k/Doc/library/shutil.rst
python/branches/py3k/Doc/library/string.rst
python/branches/py3k/Doc/library/textwrap.rst
python/branches/py3k/Doc/library/threading.rst
python/branches/py3k/Doc/library/tokenize.rst
python/branches/py3k/Doc/library/trace.rst
python/branches/py3k/Doc/library/uu.rst
Modified: python/branches/py3k/Doc/library/ast.rst
==============================================================================
--- python/branches/py3k/Doc/library/ast.rst (original)
+++ python/branches/py3k/Doc/library/ast.rst Tue Nov 16 20:13:50 2010
@@ -19,6 +19,9 @@
classes all inherit from :class:`ast.AST`. An abstract syntax tree can be
compiled into a Python code object using the built-in :func:`compile` function.
+.. seealso::
+
+ Latest version of the :source:`ast module Python source code <Lib/ast.py>`
Node classes
------------
Modified: python/branches/py3k/Doc/library/atexit.rst
==============================================================================
--- python/branches/py3k/Doc/library/atexit.rst (original)
+++ python/branches/py3k/Doc/library/atexit.rst Tue Nov 16 20:13:50 2010
@@ -11,6 +11,11 @@
functions. Functions thus registered are automatically executed upon normal
interpreter termination.
+.. seealso::
+
+ Latest version of the :source:`atexit Python source code
+ <Lib/atexit.py>`
+
Note: the functions registered via this module are not called when the program
is killed by a signal not handled by Python, when a Python fatal internal error
is detected, or when :func:`os._exit` is called.
Modified: python/branches/py3k/Doc/library/bisect.rst
==============================================================================
--- python/branches/py3k/Doc/library/bisect.rst (original)
+++ python/branches/py3k/Doc/library/bisect.rst Tue Nov 16 20:13:50 2010
@@ -14,6 +14,11 @@
algorithm to do its work. The source code may be most useful as a working
example of the algorithm (the boundary conditions are already right!).
+.. seealso::
+
+ Latest version of the :source:`bisect module Python source code
+ <Lib/bisect.py>`
+
The following functions are provided:
Modified: python/branches/py3k/Doc/library/calendar.rst
==============================================================================
--- python/branches/py3k/Doc/library/calendar.rst (original)
+++ python/branches/py3k/Doc/library/calendar.rst Tue Nov 16 20:13:50 2010
@@ -21,6 +21,10 @@
calendar in Dershowitz and Reingold's book "Calendrical Calculations", where
it's the base calendar for all computations.
+.. seealso::
+
+ Latest version of the :source:`calendar module Python source code
+ <Lib/calendar.py>`
.. class:: Calendar(firstweekday=0)
Modified: python/branches/py3k/Doc/library/cmd.rst
==============================================================================
--- python/branches/py3k/Doc/library/cmd.rst (original)
+++ python/branches/py3k/Doc/library/cmd.rst Tue Nov 16 20:13:50 2010
@@ -11,6 +11,9 @@
tools, and prototypes that will later be wrapped in a more sophisticated
interface.
+.. seealso::
+
+ Latest version of the :source:`cmd module Python source code <Lib/cmd.py>`
.. class:: Cmd(completekey='tab', stdin=None, stdout=None)
Modified: python/branches/py3k/Doc/library/collections.rst
==============================================================================
--- python/branches/py3k/Doc/library/collections.rst (original)
+++ python/branches/py3k/Doc/library/collections.rst Tue Nov 16 20:13:50 2010
@@ -31,6 +31,11 @@
ABCs (abstract base classes) that can be used to test whether a class provides a
particular interface, for example, whether it is hashable or a mapping.
+.. seealso::
+
+ Latest version of the :source:`collections module Python source code
+ <Lib/collections.py>`
+
:class:`Counter` objects
------------------------
@@ -1059,6 +1064,9 @@
.. seealso::
+ * Latest version of the :source:`Python source code for the collections
+ abstract base classes <Lib/_abcoll.py>`
+
* `OrderedSet recipe <http://code.activestate.com/recipes/576694/>`_ for an
example built on :class:`MutableSet`.
Modified: python/branches/py3k/Doc/library/contextlib.rst
==============================================================================
--- python/branches/py3k/Doc/library/contextlib.rst (original)
+++ python/branches/py3k/Doc/library/contextlib.rst Tue Nov 16 20:13:50 2010
@@ -9,6 +9,11 @@
statement. For more information see also :ref:`typecontextmanager` and
:ref:`context-managers`.
+.. seealso::
+
+ Latest version of the :source:`contextlib Python source code
+ <Lib/contextlib.py>`
+
Functions provided:
Modified: python/branches/py3k/Doc/library/dis.rst
==============================================================================
--- python/branches/py3k/Doc/library/dis.rst (original)
+++ python/branches/py3k/Doc/library/dis.rst Tue Nov 16 20:13:50 2010
@@ -10,6 +10,10 @@
input is defined in the file :file:`Include/opcode.h` and used by the compiler
and the interpreter.
+.. seealso::
+
+ Latest version of the :source:`dis module Python source code <Lib/dis.py>`
+
.. impl-detail::
Bytecode is an implementation detail of the CPython interpreter! No
Modified: python/branches/py3k/Doc/library/filecmp.rst
==============================================================================
--- python/branches/py3k/Doc/library/filecmp.rst (original)
+++ python/branches/py3k/Doc/library/filecmp.rst Tue Nov 16 20:13:50 2010
@@ -10,6 +10,11 @@
with various optional time/correctness trade-offs. For comparing files,
see also the :mod:`difflib` module.
+.. seealso::
+
+ Latest version of the :source:`filecmp Python source code
+ <Lib/filecmp.py>`
+
The :mod:`filecmp` module defines the following functions:
Modified: python/branches/py3k/Doc/library/fileinput.rst
==============================================================================
--- python/branches/py3k/Doc/library/fileinput.rst (original)
+++ python/branches/py3k/Doc/library/fileinput.rst Tue Nov 16 20:13:50 2010
@@ -44,6 +44,11 @@
returns an accordingly opened file-like object. Two useful hooks are already
provided by this module.
+.. seealso::
+
+ Latest version of the :source:`fileinput Python source code
+ <Lib/fileinput.py>`
+
The following function is the primary interface of this module:
Modified: python/branches/py3k/Doc/library/fnmatch.rst
==============================================================================
--- python/branches/py3k/Doc/library/fnmatch.rst (original)
+++ python/branches/py3k/Doc/library/fnmatch.rst Tue Nov 16 20:13:50 2010
@@ -33,6 +33,10 @@
a period are not special for this module, and are matched by the ``*`` and ``?``
patterns.
+.. seealso::
+
+ Latest version of the :source:`fnmatch Python source code
+ <Lib/fnmatch.py>`
.. function:: fnmatch(filename, pattern)
Modified: python/branches/py3k/Doc/library/functools.rst
==============================================================================
--- python/branches/py3k/Doc/library/functools.rst (original)
+++ python/branches/py3k/Doc/library/functools.rst Tue Nov 16 20:13:50 2010
@@ -13,6 +13,11 @@
or return other functions. In general, any callable object can be treated as a
function for the purposes of this module.
+.. seealso::
+
+ Latest version of the :source:`functools Python source code
+ <Lib/functools.py>`
+
The :mod:`functools` module defines the following functions:
.. function:: cmp_to_key(func)
Modified: python/branches/py3k/Doc/library/glob.rst
==============================================================================
--- python/branches/py3k/Doc/library/glob.rst (original)
+++ python/branches/py3k/Doc/library/glob.rst Tue Nov 16 20:13:50 2010
@@ -15,6 +15,9 @@
subshell. (For tilde and shell variable expansion, use
:func:`os.path.expanduser` and :func:`os.path.expandvars`.)
+.. seealso::
+
+ Latest version of the :source:`glob module Python source code <Lib/glob.py>`
.. function:: glob(pathname)
Modified: python/branches/py3k/Doc/library/heapq.rst
==============================================================================
--- python/branches/py3k/Doc/library/heapq.rst (original)
+++ python/branches/py3k/Doc/library/heapq.rst Tue Nov 16 20:13:50 2010
@@ -11,6 +11,11 @@
This module provides an implementation of the heap queue algorithm, also known
as the priority queue algorithm.
+.. seealso::
+
+ Latest version of the :source:`heapq Python source code
+ <Lib/heapq.py>`
+
Heaps are arrays for which ``heap[k] <= heap[2*k+1]`` and ``heap[k] <=
heap[2*k+2]`` for all *k*, counting elements from zero. For the sake of
comparison, non-existing elements are considered to be infinite. The
Modified: python/branches/py3k/Doc/library/keyword.rst
==============================================================================
--- python/branches/py3k/Doc/library/keyword.rst (original)
+++ python/branches/py3k/Doc/library/keyword.rst Tue Nov 16 20:13:50 2010
@@ -19,3 +19,8 @@
keywords are defined to only be active when particular :mod:`__future__`
statements are in effect, these will be included as well.
+
+.. seealso::
+
+ Latest version of the :source:`keyword module Python source code
+ <Lib/keyword.py>`
Modified: python/branches/py3k/Doc/library/linecache.rst
==============================================================================
--- python/branches/py3k/Doc/library/linecache.rst (original)
+++ python/branches/py3k/Doc/library/linecache.rst Tue Nov 16 20:13:50 2010
@@ -11,6 +11,11 @@
lines are read from a single file. This is used by the :mod:`traceback` module
to retrieve source lines for inclusion in the formatted traceback.
+.. seealso::
+
+ Latest version of the :source:`linecache module Python source code
+ <Lib/linecache.py>`
+
The :mod:`linecache` module defines the following functions:
Modified: python/branches/py3k/Doc/library/pprint.rst
==============================================================================
--- python/branches/py3k/Doc/library/pprint.rst (original)
+++ python/branches/py3k/Doc/library/pprint.rst Tue Nov 16 20:13:50 2010
@@ -21,6 +21,11 @@
Dictionaries are sorted by key before the display is computed.
+.. seealso::
+
+ Latest version of the :source:`pprint module Python source code
+ <Lib/pprint.py>`
+
The :mod:`pprint` module defines one class:
.. First the implementation class:
Modified: python/branches/py3k/Doc/library/queue.rst
==============================================================================
--- python/branches/py3k/Doc/library/queue.rst (original)
+++ python/branches/py3k/Doc/library/queue.rst Tue Nov 16 20:13:50 2010
@@ -19,6 +19,11 @@
the entries are kept sorted (using the :mod:`heapq` module) and the
lowest valued entry is retrieved first.
+.. seealso::
+
+ Latest version of the :source:`queue module Python source code
+ <Lib/queue.py>`
+
The :mod:`queue` module defines the following classes and exceptions:
.. class:: Queue(maxsize=0)
Modified: python/branches/py3k/Doc/library/quopri.rst
==============================================================================
--- python/branches/py3k/Doc/library/quopri.rst (original)
+++ python/branches/py3k/Doc/library/quopri.rst Tue Nov 16 20:13:50 2010
@@ -17,6 +17,10 @@
:mod:`base64` module is more compact if there are many such characters, as when
sending a graphics file.
+.. seealso::
+
+ Latest version of the :source:`quopri module Python source code
+ <Lib/quopri.py>`
.. function:: decode(input, output, header=False)
Modified: python/branches/py3k/Doc/library/random.rst
==============================================================================
--- python/branches/py3k/Doc/library/random.rst (original)
+++ python/branches/py3k/Doc/library/random.rst Tue Nov 16 20:13:50 2010
@@ -8,6 +8,11 @@
This module implements pseudo-random number generators for various
distributions.
+.. seealso::
+
+ Latest version of the :source:`random module Python source code
+ <Lib/random.py>`
+
For integers, there is uniform selection from a range. For sequences, there is
uniform selection of a random element, a function to generate a random
permutation of a list in-place, and a function for random sampling without
Modified: python/branches/py3k/Doc/library/sched.rst
==============================================================================
--- python/branches/py3k/Doc/library/sched.rst (original)
+++ python/branches/py3k/Doc/library/sched.rst Tue Nov 16 20:13:50 2010
@@ -10,6 +10,10 @@
The :mod:`sched` module defines a class which implements a general purpose event
scheduler:
+.. seealso::
+
+ Latest version of the :source:`sched module Python source code
+ <Lib/sched.py>`
.. class:: scheduler(timefunc, delayfunc)
Modified: python/branches/py3k/Doc/library/shelve.rst
==============================================================================
--- python/branches/py3k/Doc/library/shelve.rst (original)
+++ python/branches/py3k/Doc/library/shelve.rst Tue Nov 16 20:13:50 2010
@@ -13,6 +13,10 @@
This includes most class instances, recursive data types, and objects containing
lots of shared sub-objects. The keys are ordinary strings.
+.. seealso::
+
+ Latest version of the :source:`shelve module Python source code
+ <Lib/shelve.py>`
.. function:: open(filename, flag='c', protocol=None, writeback=False)
Modified: python/branches/py3k/Doc/library/shutil.rst
==============================================================================
--- python/branches/py3k/Doc/library/shutil.rst (original)
+++ python/branches/py3k/Doc/library/shutil.rst Tue Nov 16 20:13:50 2010
@@ -15,6 +15,11 @@
copying and removal. For operations on individual files, see also the
:mod:`os` module.
+.. seealso::
+
+ Latest version of the :source:`shutil module Python source code
+ <Lib/shutil.py>`
+
.. warning::
Even the higher-level file copying functions (:func:`copy`, :func:`copy2`)
@@ -26,6 +31,7 @@
not be correct. On Windows, file owners, ACLs and alternate data streams
are not copied.
+
Directory and files operations
------------------------------
Modified: python/branches/py3k/Doc/library/string.rst
==============================================================================
--- python/branches/py3k/Doc/library/string.rst (original)
+++ python/branches/py3k/Doc/library/string.rst Tue Nov 16 20:13:50 2010
@@ -15,6 +15,11 @@
:ref:`string-formatting` section. Also, see the :mod:`re` module for
string functions based on regular expressions.
+.. seealso::
+
+ Latest version of the :source:`string module Python source code
+ <Lib/string.py>`
+
String constants
----------------
Modified: python/branches/py3k/Doc/library/textwrap.rst
==============================================================================
--- python/branches/py3k/Doc/library/textwrap.rst (original)
+++ python/branches/py3k/Doc/library/textwrap.rst Tue Nov 16 20:13:50 2010
@@ -13,6 +13,10 @@
or two text strings, the convenience functions should be good enough;
otherwise, you should use an instance of :class:`TextWrapper` for efficiency.
+.. seealso::
+
+ Latest version of the :source:`textwrap module Python source code
+ <Lib/textwrap.py>`
.. function:: wrap(text, width=70, **kwargs)
Modified: python/branches/py3k/Doc/library/threading.rst
==============================================================================
--- python/branches/py3k/Doc/library/threading.rst (original)
+++ python/branches/py3k/Doc/library/threading.rst Tue Nov 16 20:13:50 2010
@@ -17,6 +17,11 @@
methods and functions in this module in the Python 2.x series are still
supported by this module.
+.. seealso::
+
+ Latest version of the :source:`threading module Python source code
+ <Lib/threading.py>`
+
This module defines the following functions and objects:
Modified: python/branches/py3k/Doc/library/tokenize.rst
==============================================================================
--- python/branches/py3k/Doc/library/tokenize.rst (original)
+++ python/branches/py3k/Doc/library/tokenize.rst Tue Nov 16 20:13:50 2010
@@ -12,6 +12,11 @@
as well, making it useful for implementing "pretty-printers," including
colorizers for on-screen displays.
+.. seealso::
+
+ Latest version of the :source:`tokenize module Python source code
+ <Lib/tokenize.py>`
+
The primary entry point is a :term:`generator`:
.. function:: tokenize(readline)
Modified: python/branches/py3k/Doc/library/trace.rst
==============================================================================
--- python/branches/py3k/Doc/library/trace.rst (original)
+++ python/branches/py3k/Doc/library/trace.rst Tue Nov 16 20:13:50 2010
@@ -10,6 +10,10 @@
list functions executed during a program run. It can be used in another program
or from the command line.
+.. seealso::
+
+ Latest version of the :source:`trace module Python source code
+ <Lib/trace.py>`
.. _trace-cli:
Modified: python/branches/py3k/Doc/library/uu.rst
==============================================================================
--- python/branches/py3k/Doc/library/uu.rst (original)
+++ python/branches/py3k/Doc/library/uu.rst Tue Nov 16 20:13:50 2010
@@ -21,6 +21,10 @@
This code was contributed by Lance Ellinghouse, and modified by Jack Jansen.
+.. seealso::
+
+ Latest version of the :source:`uu module Python source code <Lib/uu.py>`
+
The :mod:`uu` module defines the following functions:
More information about the Python-checkins
mailing list