Provide links to Python source in a handful of

cases where the source is a generally helpful
adjunct to the docs.
This commit is contained in:
Raymond Hettinger 2010-11-05 23:58:42 +00:00
parent 6b1167c61c
commit e679a37024
8 changed files with 39 additions and 0 deletions

View File

@ -28,6 +28,11 @@ 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 `ast module Python source code
<http://svn.python.org/view/python/branches/release27-maint/Lib/ast.py?view=markup>`_
Node classes
------------

View File

@ -22,6 +22,10 @@ in both directions. This matches the definition of the "proleptic Gregorian"
calendar in Dershowitz and Reingold's book "Calendrical Calculations", where
it's the base calendar for all computations.
.. seealso::
Latest version of the `calendar module Python source code
<http://svn.python.org/view/python/branches/release27-maint/Lib/calendar.py?view=markup>`_
.. class:: Calendar([firstweekday])

View File

@ -44,6 +44,10 @@ In addition to containers, the collections module provides some ABCs
provides a particular interface, for example, whether it is hashable or
a mapping.
.. seealso::
Latest version of the `collections module Python source code
<http://svn.python.org/view/python/branches/release27-maint/Lib/collections.py?view=markup>`_
:class:`Counter` objects
------------------------
@ -970,6 +974,9 @@ Notes on using :class:`Set` and :class:`MutableSet` as a mixin:
.. seealso::
* Latest version of the `Python source code for the collections abstract base classes
<http://svn.python.org/view/python/branches/release27-maint/Lib/_abcoll.py?view=markup>`_
* `OrderedSet recipe <http://code.activestate.com/recipes/576694/>`_ for an
example built on :class:`MutableSet`.

View File

@ -24,6 +24,11 @@ the first retrieved (operating like a stack). With a priority queue,
the entries are kept sorted (using the :mod:`heapq` module) and the
lowest valued entry is retrieved first.
.. seealso::
Latest version of the `queue module Python source code
<http://svn.python.org/view/python/branches/release27-maint/Lib/queue.py?view=markup>`_
The :mod:`Queue` module defines the following classes and exceptions:
.. class:: Queue(maxsize=0)

View File

@ -9,6 +9,11 @@
This module implements pseudo-random number generators for various
distributions.
.. seealso::
Latest version of the `random module Python source code
<http://svn.python.org/view/python/branches/release27-maint/Lib/random.py?view=markup>`_
For integers, uniform selection from a range. For sequences, 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 replacement.

View File

@ -16,6 +16,10 @@ and a utility function :func:`dedent`. If you're just wrapping or filling one
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 `textwrap module Python source code
<http://svn.python.org/view/python/branches/release27-maint/Lib/textwrap.py?view=markup>`_
.. function:: wrap(text[, width[, ...]])

View File

@ -26,6 +26,10 @@ The :mod:`dummy_threading` module is provided for situations where
Starting with Python 2.5, several Thread methods raise :exc:`RuntimeError`
instead of :exc:`AssertionError` if called erroneously.
.. seealso::
Latest version of the `threading module Python source code
<http://svn.python.org/view/python/branches/release27-maint/Lib/threading.py?view=markup>`_
This module defines the following functions and objects:

View File

@ -19,6 +19,11 @@ available starting with Python version 2.2). Prior to the introduction of
sub-classes that obtained new behaviors by overriding existing methods or adding
new ones.
.. seealso::
Latest version of the `UserDict Python source code
<http://svn.python.org/view/python/branches/release27-maint/Lib/UserDict.py?view=markup>`_
The :mod:`UserDict` module defines the :class:`UserDict` class and
:class:`DictMixin`: