summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2011-01-10 03:26:08 +0000
committerRaymond Hettinger <python@rcn.com>2011-01-10 03:26:08 +0000
commit10480940373492652bc285fca3fa74751c271645 (patch)
treebb1bfed3416120cc371eb884960cf73aad9a957e
parenta4815caa7ccf21aa994d0e0eec66873072f0e352 (diff)
downloadcpython-git-10480940373492652bc285fca3fa74751c271645.tar.gz
Move source links to consistent location and remove wordy, big yellow boxes.
-rw-r--r--Doc/library/ast.rst4
-rw-r--r--Doc/library/bisect.rst7
-rw-r--r--Doc/library/calendar.rst4
-rw-r--r--Doc/library/cmd.rst5
-rw-r--r--Doc/library/collections.rst7
-rw-r--r--Doc/library/contextlib.rst6
-rw-r--r--Doc/library/dis.rst7
-rw-r--r--Doc/library/filecmp.rst6
-rw-r--r--Doc/library/fileinput.rst6
-rw-r--r--Doc/library/fnmatch.rst5
-rw-r--r--Doc/library/glob.rst4
-rw-r--r--Doc/library/heapq.rst7
-rw-r--r--Doc/library/keyword.rst7
-rw-r--r--Doc/library/linecache.rst6
-rw-r--r--Doc/library/pprint.rst6
-rw-r--r--Doc/library/queue.rst3
-rw-r--r--Doc/library/random.rst8
-rw-r--r--Doc/library/sched.rst7
-rw-r--r--Doc/library/shelve.rst6
-rw-r--r--Doc/library/shutil.rst9
-rw-r--r--Doc/library/string.rst4
-rw-r--r--Doc/library/textwrap.rst6
-rw-r--r--Doc/library/threading.rst6
-rw-r--r--Doc/library/tokenize.rst6
-rw-r--r--Doc/library/trace.rst6
-rw-r--r--Doc/library/uu.rst3
26 files changed, 37 insertions, 114 deletions
diff --git a/Doc/library/ast.rst b/Doc/library/ast.rst
index 9d19771cbe..b5e08cbd53 100644
--- a/Doc/library/ast.rst
+++ b/Doc/library/ast.rst
@@ -7,6 +7,7 @@
.. sectionauthor:: Martin v. Löwis <martin@v.loewis.de>
.. sectionauthor:: Georg Brandl <georg@python.org>
+**Source code:** :source:`Lib/ast.py`
The :mod:`ast` module helps Python applications to process trees of the Python
abstract syntax grammar. The abstract syntax itself might change with each
@@ -19,9 +20,6 @@ helper provided in this module. The result will be a tree of objects whose
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
------------
diff --git a/Doc/library/bisect.rst b/Doc/library/bisect.rst
index ca853e0f82..98955e6aae 100644
--- a/Doc/library/bisect.rst
+++ b/Doc/library/bisect.rst
@@ -7,6 +7,8 @@
.. sectionauthor:: Raymond Hettinger <python at rcn.com>
.. example based on the PyModules FAQ entry by Aaron Watters <arw@pythonpros.com>
+**Source code:** :source:`Lib/bisect.py`
+
This module provides support for maintaining a list in sorted order without
having to sort the list after each insertion. For long lists of items with
expensive comparison operations, this can be an improvement over the more common
@@ -14,11 +16,6 @@ approach. The module is called :mod:`bisect` because it uses a basic bisection
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:
diff --git a/Doc/library/calendar.rst b/Doc/library/calendar.rst
index ac6b294c12..06a12cdd8f 100644
--- a/Doc/library/calendar.rst
+++ b/Doc/library/calendar.rst
@@ -6,6 +6,7 @@
of the Unix cal program.
.. sectionauthor:: Drew Csillag <drew_csillag@geocities.com>
+**Source code:** :source:`Lib/calendar.py`
This module allows you to output calendars like the Unix :program:`cal` program,
and provides additional useful functions related to the calendar. By default,
@@ -309,6 +310,3 @@ The :mod:`calendar` module exports the following data attributes:
Module :mod:`time`
Low-level time related functions.
-
- Latest version of the :source:`calendar module Python source code
- <Lib/calendar.py>`
diff --git a/Doc/library/cmd.rst b/Doc/library/cmd.rst
index 53d62c5c94..a0ae42510d 100644
--- a/Doc/library/cmd.rst
+++ b/Doc/library/cmd.rst
@@ -5,16 +5,13 @@
:synopsis: Build line-oriented command interpreters.
.. sectionauthor:: Eric S. Raymond <esr@snark.thyrsus.com>
+**Source code:** :source:`Lib/cmd.py`
The :class:`Cmd` class provides a simple framework for writing line-oriented
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 :source:`cmd module Python source code <Lib/cmd.py>`
-
.. class:: Cmd(completekey='tab', stdin=None, stdout=None)
A :class:`Cmd` instance or subclass instance is a line-oriented interpreter
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst
index 3e03dee3ac..d5ade412e4 100644
--- a/Doc/library/collections.rst
+++ b/Doc/library/collections.rst
@@ -12,6 +12,8 @@
import itertools
__name__ = '<doctest>'
+**Source code:** :source:`Lib/collections.py`
+
This module implements specialized container datatypes providing alternatives to
Python's general purpose built-in containers, :class:`dict`, :class:`list`,
:class:`set`, and :class:`tuple`.
@@ -31,11 +33,6 @@ In addition to the concrete container classes, the collections module provides
:ref:`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
------------------------
diff --git a/Doc/library/contextlib.rst b/Doc/library/contextlib.rst
index 5e1a11a116..5c56a5d494 100644
--- a/Doc/library/contextlib.rst
+++ b/Doc/library/contextlib.rst
@@ -4,16 +4,12 @@
.. module:: contextlib
:synopsis: Utilities for with-statement contexts.
+**Source code:** :source:`Lib/contextlib.py`
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 :source:`contextlib Python source code
- <Lib/contextlib.py>`
-
Functions provided:
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst
index 10cf55599a..1d21c49f3b 100644
--- a/Doc/library/dis.rst
+++ b/Doc/library/dis.rst
@@ -4,19 +4,16 @@
.. module:: dis
:synopsis: Disassembler for Python bytecode.
+**Source code:** :source:`Lib/dis.py`
The :mod:`dis` module supports the analysis of CPython :term:`bytecode` by
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 :source:`dis module Python source code <Lib/dis.py>`
-
.. impl-detail::
- Bytecode is an implementation detail of the CPython interpreter! No
+ Bytecode is an implementation detail of the CPython interpreter. No
guarantees are made that bytecode will not be added, removed, or changed
between versions of Python. Use of this module should not be considered to
work across Python VMs or Python releases.
diff --git a/Doc/library/filecmp.rst b/Doc/library/filecmp.rst
index d6cdd29cb5..ead8588054 100644
--- a/Doc/library/filecmp.rst
+++ b/Doc/library/filecmp.rst
@@ -5,16 +5,12 @@
:synopsis: Compare files efficiently.
.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
+**Source code:** :source:`Lib/filecmp.py`
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 :source:`filecmp Python source code
- <Lib/filecmp.py>`
-
The :mod:`filecmp` module defines the following functions:
diff --git a/Doc/library/fileinput.rst b/Doc/library/fileinput.rst
index 9174830fc1..1e71ebdcb9 100644
--- a/Doc/library/fileinput.rst
+++ b/Doc/library/fileinput.rst
@@ -6,6 +6,7 @@
.. moduleauthor:: Guido van Rossum <guido@python.org>
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
+**Source code:** :source:`Lib/fileinput.py`
This module implements a helper class and functions to quickly write a
loop over standard input or a list of files. If you just want to read or
@@ -44,11 +45,6 @@ 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 :source:`fileinput Python source code
- <Lib/fileinput.py>`
-
The following function is the primary interface of this module:
diff --git a/Doc/library/fnmatch.rst b/Doc/library/fnmatch.rst
index f162959928..3b9a6c3aeb 100644
--- a/Doc/library/fnmatch.rst
+++ b/Doc/library/fnmatch.rst
@@ -9,6 +9,8 @@
.. index:: module: re
+**Source code:** :source:`Lib/fnmatch.py`
+
This module provides support for Unix shell-style wildcards, which are *not* the
same as regular expressions (which are documented in the :mod:`re` module). The
special characters used in shell-style wildcards are:
@@ -88,6 +90,3 @@ patterns.
Module :mod:`glob`
Unix shell-style path expansion.
-
- Latest version of the :source:`fnmatch Python source code
- <Lib/fnmatch.py>`
diff --git a/Doc/library/glob.rst b/Doc/library/glob.rst
index 7e21f1b39e..320df28f5f 100644
--- a/Doc/library/glob.rst
+++ b/Doc/library/glob.rst
@@ -7,6 +7,8 @@
.. index:: single: filenames; pathname expansion
+**Source code:** :source:`Lib/glob.py`
+
The :mod:`glob` module finds all the pathnames matching a specified pattern
according to the rules used by the Unix shell. No tilde expansion is done, but
``*``, ``?``, and character ranges expressed with ``[]`` will be correctly
@@ -50,5 +52,3 @@ preserved. ::
Module :mod:`fnmatch`
Shell-style filename (not path) expansion
- Latest version of the :source:`glob module Python source code <Lib/glob.py>`
-
diff --git a/Doc/library/heapq.rst b/Doc/library/heapq.rst
index f6b14ca6d9..f59c3b877e 100644
--- a/Doc/library/heapq.rst
+++ b/Doc/library/heapq.rst
@@ -8,14 +8,11 @@
.. sectionauthor:: François Pinard
.. sectionauthor:: Raymond Hettinger
+**Source code:** :source:`Lib/heapq.py`
+
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 binary trees for which every parent node has a value less than or
equal to any of its children. This implementation uses arrays for which
``heap[k] <= heap[2*k+1]`` and ``heap[k] <= heap[2*k+2]`` for all *k*, counting
diff --git a/Doc/library/keyword.rst b/Doc/library/keyword.rst
index 4d8a1f1434..d86fef0518 100644
--- a/Doc/library/keyword.rst
+++ b/Doc/library/keyword.rst
@@ -4,6 +4,7 @@
.. module:: keyword
:synopsis: Test whether a string is a keyword in Python.
+**Source code:** :source:`Lib/keyword.py`
This module allows a Python program to determine if a string is a keyword.
@@ -18,9 +19,3 @@ This module allows a Python program to determine if a string is a keyword.
Sequence containing all the keywords defined for the interpreter. If any
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>`
diff --git a/Doc/library/linecache.rst b/Doc/library/linecache.rst
index d8a9ff3af3..ee965fe903 100644
--- a/Doc/library/linecache.rst
+++ b/Doc/library/linecache.rst
@@ -5,17 +5,13 @@
:synopsis: This module provides random access to individual lines from text files.
.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
+**Source code:** :source:`Lib/linecache.py`
The :mod:`linecache` module allows one to get any line from any file, while
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 :source:`linecache module Python source code
- <Lib/linecache.py>`
-
The :mod:`linecache` module defines the following functions:
diff --git a/Doc/library/pprint.rst b/Doc/library/pprint.rst
index 82648a1e91..58b6702fda 100644
--- a/Doc/library/pprint.rst
+++ b/Doc/library/pprint.rst
@@ -6,6 +6,7 @@
.. moduleauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
+**Source code:** :source:`Lib/pprint.py`
The :mod:`pprint` module provides a capability to "pretty-print" arbitrary
Python data structures in a form which can be used as input to the interpreter.
@@ -21,11 +22,6 @@ width constraint.
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:
diff --git a/Doc/library/queue.rst b/Doc/library/queue.rst
index e3596bb2f3..bc3821e2eb 100644
--- a/Doc/library/queue.rst
+++ b/Doc/library/queue.rst
@@ -4,6 +4,7 @@
.. module:: queue
:synopsis: A synchronized queue class.
+**Source code:** :source:`Lib/queue.py`
The :mod:`queue` module implements multi-producer, multi-consumer queues.
It is especially useful in threaded programming when information must be
@@ -181,5 +182,3 @@ Example of how to wait for enqueued tasks to be completed::
queues with fast atomic :func:`append` and :func:`popleft` operations that
do not require locking.
- Latest version of the :source:`queue module Python source code
- <Lib/queue.py>`
diff --git a/Doc/library/random.rst b/Doc/library/random.rst
index c5a566600b..85253123aa 100644
--- a/Doc/library/random.rst
+++ b/Doc/library/random.rst
@@ -4,15 +4,11 @@
.. module:: random
:synopsis: Generate pseudo-random numbers with various common distributions.
+**Source code:** :source:`Lib/random.py`
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
@@ -45,8 +41,8 @@ The :mod:`random` module also provides the :class:`SystemRandom` class which
uses the system function :func:`os.urandom` to generate random numbers
from sources provided by the operating system.
-Bookkeeping functions:
+Bookkeeping functions:
.. function:: seed([x], version=2)
diff --git a/Doc/library/sched.rst b/Doc/library/sched.rst
index 94f79915a2..a76aacc9f8 100644
--- a/Doc/library/sched.rst
+++ b/Doc/library/sched.rst
@@ -7,14 +7,11 @@
.. index:: single: event scheduling
+**Source code:** :source:`Lib/sched.py`
+
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)
The :class:`scheduler` class defines a generic interface to scheduling events.
diff --git a/Doc/library/shelve.rst b/Doc/library/shelve.rst
index de2283351f..499ab5181a 100644
--- a/Doc/library/shelve.rst
+++ b/Doc/library/shelve.rst
@@ -7,16 +7,14 @@
.. index:: module: pickle
+**Source code:** :source:`Lib/shelve.py`
+
A "shelf" is a persistent, dictionary-like object. The difference with "dbm"
databases is that the values (not the keys!) in a shelf can be essentially
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 :source:`shelve module Python source code
- <Lib/shelve.py>`
.. function:: open(filename, flag='c', protocol=None, writeback=False)
diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst
index 0144876719..759dab1328 100644
--- a/Doc/library/shutil.rst
+++ b/Doc/library/shutil.rst
@@ -10,20 +10,17 @@
single: file; copying
single: copying files
+**Source code:** :source:`Lib/shutil.py`
+
The :mod:`shutil` module offers a number of high-level operations on files and
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 :source:`shutil module Python source code
- <Lib/shutil.py>`
-
.. warning::
Even the higher-level file copying functions (:func:`copy`, :func:`copy2`)
- can't copy all file metadata.
+ cannot copy all file metadata.
On POSIX platforms, this means that file owner and group are lost as well
as ACLs. On Mac OS, the resource fork and other metadata are not used.
diff --git a/Doc/library/string.rst b/Doc/library/string.rst
index 0162779ba2..904df29d5f 100644
--- a/Doc/library/string.rst
+++ b/Doc/library/string.rst
@@ -11,9 +11,7 @@
:ref:`string-methods`
- Latest version of the :source:`string module Python source code
- <Lib/string.py>`
-
+**Source code:** :source:`Lib/string.py`
String constants
----------------
diff --git a/Doc/library/textwrap.rst b/Doc/library/textwrap.rst
index 860f81f936..74e5b2ecf0 100644
--- a/Doc/library/textwrap.rst
+++ b/Doc/library/textwrap.rst
@@ -6,6 +6,7 @@
.. moduleauthor:: Greg Ward <gward@python.net>
.. sectionauthor:: Greg Ward <gward@python.net>
+**Source code:** :source:`Lib/textwrap.py`
The :mod:`textwrap` module provides two convenience functions, :func:`wrap` and
:func:`fill`, as well as :class:`TextWrapper`, the class that does all the work,
@@ -13,11 +14,6 @@ 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 :source:`textwrap module Python source code
- <Lib/textwrap.py>`
-
.. function:: wrap(text, width=70, **kwargs)
Wraps the single paragraph in *text* (a string) so every line is at most
diff --git a/Doc/library/threading.rst b/Doc/library/threading.rst
index 3b1b1bfe22..03ff44c597 100644
--- a/Doc/library/threading.rst
+++ b/Doc/library/threading.rst
@@ -4,6 +4,7 @@
.. module:: threading
:synopsis: Thread-based parallelism.
+**Source code:** :source:`Lib/threading.py`
This module constructs higher-level threading interfaces on top of the lower
level :mod:`_thread` module. See also the :mod:`queue` module.
@@ -28,11 +29,6 @@ The :mod:`dummy_threading` module is provided for situations where
However, threading is still an appropriate model if you want to run
multiple I/O-bound tasks simultaneously.
-.. seealso::
-
- Latest version of the :source:`threading module Python source code
- <Lib/threading.py>`
-
This module defines the following functions and objects:
diff --git a/Doc/library/tokenize.rst b/Doc/library/tokenize.rst
index d7ae6382e4..9c05439e00 100644
--- a/Doc/library/tokenize.rst
+++ b/Doc/library/tokenize.rst
@@ -6,17 +6,13 @@
.. moduleauthor:: Ka Ping Yee
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
+**Source code:** :source:`Lib/tokenize.py`
The :mod:`tokenize` module provides a lexical scanner for Python source code,
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 :source:`tokenize module Python source code
- <Lib/tokenize.py>`
-
The primary entry point is a :term:`generator`:
.. function:: tokenize(readline)
diff --git a/Doc/library/trace.rst b/Doc/library/trace.rst
index 96f31e9719..5a32482e69 100644
--- a/Doc/library/trace.rst
+++ b/Doc/library/trace.rst
@@ -4,17 +4,13 @@
.. module:: trace
:synopsis: Trace or track Python statement execution.
+**Source code:** :source:`Lib/trace.py`
The :mod:`trace` module allows you to trace program execution, generate
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 :source:`trace module Python source code
- <Lib/trace.py>`
-
.. _trace-cli:
Command-Line Usage
diff --git a/Doc/library/uu.rst b/Doc/library/uu.rst
index ac5bca49ac..7c1d67c6e9 100644
--- a/Doc/library/uu.rst
+++ b/Doc/library/uu.rst
@@ -5,6 +5,7 @@
:synopsis: Encode and decode files in uuencode format.
.. moduleauthor:: Lance Ellinghouse
+**Source code:** :source:`Lib/uu.py`
This module encodes and decodes files in uuencode format, allowing arbitrary
binary data to be transferred over ASCII-only connections. Wherever a file
@@ -56,5 +57,3 @@ The :mod:`uu` module defines the following functions:
Module :mod:`binascii`
Support module containing ASCII-to-binary and binary-to-ASCII conversions.
-
- Latest version of the :source:`uu module Python source code <Lib/uu.py>`