]> granicus.if.org Git - python/commitdiff
Add more links to Python sources where the code is short, readable and an informative...
authorRaymond Hettinger <python@rcn.com>
Sat, 6 Nov 2010 07:10:31 +0000 (07:10 +0000)
committerRaymond Hettinger <python@rcn.com>
Sat, 6 Nov 2010 07:10:31 +0000 (07:10 +0000)
24 files changed:
Doc/library/atexit.rst
Doc/library/bisect.rst
Doc/library/cmd.rst
Doc/library/contextlib.rst
Doc/library/dis.rst
Doc/library/filecmp.rst
Doc/library/fileinput.rst
Doc/library/fnmatch.rst
Doc/library/functools.rst
Doc/library/glob.rst
Doc/library/heapq.rst
Doc/library/keyword.rst
Doc/library/linecache.rst
Doc/library/pprint.rst
Doc/library/quopri.rst
Doc/library/repr.rst
Doc/library/sched.rst
Doc/library/shelve.rst
Doc/library/shutil.rst
Doc/library/string.rst
Doc/library/tokenize.rst
Doc/library/trace.rst
Doc/library/urlparse.rst
Doc/library/uu.rst

index 8b33d5c91f4d362df78bbb402b47a944abb88d21..8d5bbabac489fa46529c79c1bd40ed5479791a78 100644 (file)
@@ -14,6 +14,11 @@ The :mod:`atexit` module defines a single function to register cleanup
 functions.  Functions thus registered are automatically executed upon normal
 interpreter termination.
 
+.. seealso::
+
+   Latest version of the `atexit Python source code
+   <http://svn.python.org/view/python/branches/release27-maint/Lib/atexit.py?view=markup>`_
+
 Note: the functions registered via this module are not called when the program
 is killed by a signal, when a Python fatal internal error is detected, or when
 :func:`os._exit` is called.
index c5662166edadb7c70ae321aaf8333f68b109aacd..48cb3310a23747858aa09019f2a222690d86a0d1 100644 (file)
@@ -16,6 +16,11 @@ example of the algorithm (the boundary conditions are already right!).
 
 .. versionadded:: 2.1
 
+.. seealso::
+
+   Latest version of the `bisect module Python source code
+   <http://svn.python.org/view/python/branches/release27-maint/Lib/bisect.py?view=markup>`_
+
 The following functions are provided:
 
 
index cc49990c8f1a76c114bfd6880a4aa677efe35fd0..b35373cc14e1872c3194474ccac478194c039fd8 100644 (file)
@@ -12,6 +12,10 @@ command interpreters.  These are often useful for test harnesses, administrative
 tools, and prototypes that will later be wrapped in a more sophisticated
 interface.
 
+.. seealso::
+
+   Latest version of the `cmd module Python source code
+   <http://svn.python.org/view/python/branches/release27-maint/Lib/cmd.py?view=markup>`_
 
 .. class:: Cmd([completekey[, stdin[, stdout]]])
 
index 3005bd00f5d0a487e92584f5f17f289c1c214796..c4350821b5eef094921e0e336525196d24e39f98 100644 (file)
@@ -11,6 +11,11 @@ This module provides utilities for common tasks involving the :keyword:`with`
 statement. For more information see also :ref:`typecontextmanager` and
 :ref:`context-managers`.
 
+.. seealso::
+
+   Latest version of the `contextlib Python source code
+   <http://svn.python.org/view/python/branches/release27-maint/Lib/contextlib.py?view=markup>`_
+
 Functions provided:
 
 
index 95edac9b8fe9006ecb0e1d844ef35645d3163ff2..ac8d653c22c4e1e0afd0e1acdc948dcbd3e36fa3 100644 (file)
@@ -11,6 +11,11 @@ disassembling it. The CPython bytecode which this module takes as an
 input is defined in the file :file:`Include/opcode.h` and used by the compiler
 and the interpreter.
 
+.. seealso::
+
+   Latest version of the `dis module Python source code
+   <http://svn.python.org/view/python/branches/release27-maint/Lib/dis.py?view=markup>`_
+
 .. impl-detail::
 
    Bytecode is an implementation detail of the CPython interpreter!  No
index 11d74ba770c766837804478933067fde47c3a7f8..699e510438b8b94eb3f26194344e3454096a5a52 100644 (file)
@@ -11,6 +11,11 @@ The :mod:`filecmp` module defines functions to compare files and directories,
 with various optional time/correctness trade-offs. For comparing files,
 see also the :mod:`difflib` module.
 
+.. seealso::
+
+   Latest version of the `filecmp Python source code
+   <http://svn.python.org/view/python/branches/release27-maint/Lib/filecmp.py?view=markup>`_
+
 The :mod:`filecmp` module defines the following functions:
 
 
index ffd109c434af64e40ab703bc6fd36884108532f9..709237e41c0db1c305a268da653bfc6eddc520df 100644 (file)
@@ -44,6 +44,11 @@ hook must be a function that takes two arguments, *filename* and *mode*, and
 returns an accordingly opened file-like object. Two useful hooks are already
 provided by this module.
 
+.. seealso::
+
+   Latest version of the `fileinput Python source code
+   <http://svn.python.org/view/python/branches/release27-maint/Lib/fileinput.py?view=markup>`_
+
 The following function is the primary interface of this module:
 
 
index 3d41726e3bae751b3118b8e8ce8dca3942bc94fa..cb1fa106f946ec0438c8c538f70324c04518b3d1 100644 (file)
@@ -34,6 +34,10 @@ module.  See module :mod:`glob` for pathname expansion (:mod:`glob` uses
 a period are not special for this module, and are matched by the ``*`` and ``?``
 patterns.
 
+.. seealso::
+
+   Latest version of the `fnmatch Python source code
+   <http://svn.python.org/view/python/branches/release27-maint/Lib/fnmatch.py?view=markup>`_
 
 .. function:: fnmatch(filename, pattern)
 
index 0c5e57b0b0e12bb0dbff3787590c2078b4c7b37c..787c000951d184ce0fb496c88c6d1cf3d956c530 100644 (file)
@@ -15,6 +15,11 @@ The :mod:`functools` module is for higher-order functions: functions that act on
 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 `functools Python source code
+   <http://svn.python.org/view/python/branches/release27-maint/Lib/functools.py?view=markup>`_
+
 The :mod:`functools` module defines the following functions:
 
 ..  function:: cmp_to_key(func)
index 5f2848088412b632e87cf2793dcd20b9dc8a7328..1ef9a310615fd180b973c5a24a80bdfc0477ca15 100644 (file)
@@ -16,6 +16,10 @@ matched.  This is done by using the :func:`os.listdir` and
 subshell.  (For tilde and shell variable expansion, use
 :func:`os.path.expanduser` and :func:`os.path.expandvars`.)
 
+.. seealso::
+
+   Latest version of the `glob module Python source code
+   <http://svn.python.org/view/python/branches/release27-maint/Lib/glob.py?view=markup>`_
 
 .. function:: glob(pathname)
 
index 6c0e467714097483a98d4885862154cc4be6598a..b46bd8201f37aefc2920093c9f577bd1f76cea3a 100644 (file)
 This module provides an implementation of the heap queue algorithm, also known
 as the priority queue algorithm.
 
+.. seealso::
+
+   Latest version of the `heapq Python source code
+   <http://svn.python.org/view/python/branches/release27-maint/Lib/heapq.py?view=markup>`_
+
 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
index 32a2d347df6b67b8787e235a279d9b65e86a22ea..3b69d0b03c53769a5b23ebbe34128f001cce1a78 100644 (file)
@@ -20,3 +20,8 @@ This module allows a Python program to determine if a string is a keyword.
    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 `keyword module Python source code
+   <http://svn.python.org/view/python/branches/release27-maint/Lib/keyword.py?view=markup>`_
index 5c1ad8686ca4ffe50d24f5332e7b01dc3cb3fe96..8ebee0585566818937ab362de913be8c77e29864 100644 (file)
@@ -12,6 +12,11 @@ attempting to optimize internally, using a cache, the common case where many
 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 `linecache module Python source code
+   <http://svn.python.org/view/python/branches/release27-maint/Lib/linecache.py?view=markup>`_
+
 The :mod:`linecache` module defines the following functions:
 
 
index 36a2bc489fbf1d84ef76a601b679db128708039b..7f13029153949a94e8b66383495ee36c19745cc6 100644 (file)
@@ -28,6 +28,11 @@ width constraint.
 .. versionchanged:: 2.6
    Added support for :class:`set` and :class:`frozenset`.
 
+.. seealso::
+
+   Latest version of the `pprint module Python source code
+   <http://svn.python.org/view/python/branches/release27-maint/Lib/pprint.py?view=markup>`_
+
 The :mod:`pprint` module defines one class:
 
 .. First the implementation class:
index f4674dc3d2969932e9118d6bdd95a78eb8bbdbdc..87d70c382c6870698d02f22af543a0cff19e2bf8 100644 (file)
@@ -18,6 +18,10 @@ few nonprintable characters; the base64 encoding scheme available via the
 :mod:`base64` module is more compact if there are many such characters, as when
 sending a graphics file.
 
+.. seealso::
+
+   Latest version of the `quopri module Python source code
+   <http://svn.python.org/view/python/branches/release27-maint/Lib/quopri.py?view=markup>`_
 
 .. function:: decode(input, output[,header])
 
index 78284f0e13e91aef872521133294800aed60dac9..5bf5bf2d9233b4ece0648f53252d058da317b519 100644 (file)
@@ -15,6 +15,11 @@ The :mod:`repr` module provides a means for producing object representations
 with limits on the size of the resulting strings. This is used in the Python
 debugger and may be useful in other contexts as well.
 
+.. seealso::
+
+   Latest version of the `repr module Python source code
+   <http://svn.python.org/view/python/branches/release27-maint/Lib/repr.py?view=markup>`_
+
 This module provides a class, an instance, and a function:
 
 
index 51b9d3fb660de1df366e8943d67eaa671fb32a49..1efe47ac0d47881b1e48289788442cec711e5ed9 100644 (file)
 The :mod:`sched` module defines a class which implements a general purpose event
 scheduler:
 
+.. seealso::
+
+   Latest version of the `sched module Python source code
+   <http://svn.python.org/view/python/branches/release27-maint/Lib/sched.py?view=markup>`_
 
 .. class:: scheduler(timefunc, delayfunc)
 
index c0bcb80f19090a1257ee9adfbb6c2b241ebf338a..3616724319092dcba1d28901c82cf69115428faf 100644 (file)
@@ -13,6 +13,10 @@ arbitrary Python objects --- anything that the :mod:`pickle` module can handle.
 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 `shelve module Python source code
+   <http://svn.python.org/view/python/branches/release27-maint/Lib/shelve.py?view=markup>`_
 
 .. function:: open(filename[, flag='c'[, protocol=None[, writeback=False]]])
 
index 0b343d4988609eaa5ba5c4d4c8dcbaf2b06235fc..1b160d892ab06c98ca3dfd611799fe61b9ea4284 100644 (file)
@@ -16,6 +16,11 @@ collections of files.  In particular, functions are provided  which support file
 copying and removal. For operations on individual files, see also the
 :mod:`os` module.
 
+.. seealso::
+
+   Latest version of the `shutil module Python source code
+   <http://svn.python.org/view/python/branches/release27-maint/Lib/shutil.py?view=markup>`_
+
 .. warning::
 
    Even the higher-level file copying functions (:func:`copy`, :func:`copy2`)
@@ -27,6 +32,7 @@ copying and removal. For operations on individual files, see also the
    not be correct. On Windows, file owners, ACLs and alternate data streams
    are not copied.
 
+
 Directory and files operations
 ------------------------------
 
index 65dd625539584e07d252618b35b4b0e6c90a7d97..bcbc31e5f8d07c86b1bc88be0f7c2bdc29d0fe4f 100644 (file)
@@ -17,6 +17,11 @@ template strings or the ``%`` operator described in the
 :ref:`string-formatting` section. Also, see the :mod:`re` module for
 string functions based on regular expressions.
 
+.. seealso::
+
+   Latest version of the `string module Python source code
+   <http://svn.python.org/view/python/branches/release27-maint/Lib/string.py?view=markup>`_
+
 
 String constants
 ----------------
index 36f58386665bdee85c8b51561d79f68d5034e190..2a7dea10251dc51e697b6c4b1903650f32b39c64 100644 (file)
@@ -13,6 +13,11 @@ implemented in Python.  The scanner in this module returns comments as tokens as
 well, making it useful for implementing "pretty-printers," including colorizers
 for on-screen displays.
 
+.. seealso::
+
+   Latest version of the `tokenize module Python source code
+   <http://svn.python.org/view/python/branches/release27-maint/Lib/tokenize.py?view=markup>`_
+
 The primary entry point is a :term:`generator`:
 
 .. function:: generate_tokens(readline)
index f79d7e5c8a8e3a0b9e7c23d2ddc97283887ddb60..1bc37fd00d9fac397cf31df103cfd9016ae8dc6d 100644 (file)
@@ -11,6 +11,10 @@ annotated statement coverage listings, print caller/callee relationships and
 list functions executed during a program run.  It can be used in another program
 or from the command line.
 
+.. seealso::
+
+   Latest version of the `trace module Python source code
+   <http://svn.python.org/view/python/branches/release27-maint/Lib/trace.py?view=markup>`_
 
 .. _trace-cli:
 
index f3730e3308509ba194d9507bff676922a5e991d7..26d422fd117aa0d01662e5c8ce9393774e0a8e4f 100644 (file)
@@ -33,6 +33,11 @@ following URL schemes: ``file``, ``ftp``, ``gopher``, ``hdl``, ``http``,
 .. versionadded:: 2.5
    Support for the ``sftp`` and ``sips`` schemes.
 
+.. seealso::
+
+   Latest version of the `urlparse module Python source code
+   <http://svn.python.org/view/python/branches/release27-maint/Lib/urlparse.py?view=markup>`_
+
 The :mod:`urlparse` module defines the following functions:
 
 
index e2303c37f07193d9157f98b7ccc39b484277aba7..fa1477b3452a1bd8f2f09ba43307b3617ff31f4d 100644 (file)
@@ -22,6 +22,11 @@ that, when required, the mode is ``'rb'`` or ``'wb'`` on Windows.
 
 This code was contributed by Lance Ellinghouse, and modified by Jack Jansen.
 
+.. seealso::
+
+   Latest version of the `uu module Python source code
+   <http://svn.python.org/view/python/branches/release27-maint/Lib/uu.py?view=markup>`_
+
 The :mod:`uu` module defines the following functions: