From 10480940373492652bc285fca3fa74751c271645 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Mon, 10 Jan 2011 03:26:08 +0000 Subject: Move source links to consistent location and remove wordy, big yellow boxes. --- Doc/library/ast.rst | 4 +--- Doc/library/bisect.rst | 7 ++----- Doc/library/calendar.rst | 4 +--- Doc/library/cmd.rst | 5 +---- Doc/library/collections.rst | 7 ++----- Doc/library/contextlib.rst | 6 +----- Doc/library/dis.rst | 7 ++----- Doc/library/filecmp.rst | 6 +----- Doc/library/fileinput.rst | 6 +----- Doc/library/fnmatch.rst | 5 ++--- Doc/library/glob.rst | 4 ++-- Doc/library/heapq.rst | 7 ++----- Doc/library/keyword.rst | 7 +------ Doc/library/linecache.rst | 6 +----- Doc/library/pprint.rst | 6 +----- Doc/library/queue.rst | 3 +-- Doc/library/random.rst | 8 ++------ Doc/library/sched.rst | 7 ++----- Doc/library/shelve.rst | 6 ++---- Doc/library/shutil.rst | 9 +++------ Doc/library/string.rst | 4 +--- Doc/library/textwrap.rst | 6 +----- Doc/library/threading.rst | 6 +----- Doc/library/tokenize.rst | 6 +----- Doc/library/trace.rst | 6 +----- Doc/library/uu.rst | 3 +-- 26 files changed, 37 insertions(+), 114 deletions(-) diff --git a/Doc/library/ast.rst b/Doc/library/ast.rst index 9d19771..b5e08cb 100644 --- a/Doc/library/ast.rst +++ b/Doc/library/ast.rst @@ -7,6 +7,7 @@ .. sectionauthor:: Martin v. Löwis .. sectionauthor:: Georg Brandl +**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 ` Node classes ------------ diff --git a/Doc/library/bisect.rst b/Doc/library/bisect.rst index ca853e0..98955e6 100644 --- a/Doc/library/bisect.rst +++ b/Doc/library/bisect.rst @@ -7,6 +7,8 @@ .. sectionauthor:: Raymond Hettinger .. example based on the PyModules FAQ entry by Aaron Watters +**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 - ` - The following functions are provided: diff --git a/Doc/library/calendar.rst b/Doc/library/calendar.rst index ac6b294..06a12cd 100644 --- a/Doc/library/calendar.rst +++ b/Doc/library/calendar.rst @@ -6,6 +6,7 @@ of the Unix cal program. .. sectionauthor:: Drew Csillag +**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 - ` diff --git a/Doc/library/cmd.rst b/Doc/library/cmd.rst index 53d62c5..a0ae425 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 +**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 ` - .. 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 3e03dee..d5ade41 100644 --- a/Doc/library/collections.rst +++ b/Doc/library/collections.rst @@ -12,6 +12,8 @@ import itertools __name__ = '' +**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 - ` - :class:`Counter` objects ------------------------ diff --git a/Doc/library/contextlib.rst b/Doc/library/contextlib.rst index 5e1a11a..5c56a5d 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 - ` - Functions provided: diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst index 10cf555..1d21c49 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 ` - .. 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 d6cdd29..ead8588 100644 --- a/Doc/library/filecmp.rst +++ b/Doc/library/filecmp.rst @@ -5,16 +5,12 @@ :synopsis: Compare files efficiently. .. sectionauthor:: Moshe Zadka +**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 - ` - The :mod:`filecmp` module defines the following functions: diff --git a/Doc/library/fileinput.rst b/Doc/library/fileinput.rst index 9174830..1e71ebd 100644 --- a/Doc/library/fileinput.rst +++ b/Doc/library/fileinput.rst @@ -6,6 +6,7 @@ .. moduleauthor:: Guido van Rossum .. sectionauthor:: Fred L. Drake, Jr. +**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 - ` - The following function is the primary interface of this module: diff --git a/Doc/library/fnmatch.rst b/Doc/library/fnmatch.rst index f162959..3b9a6c3 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 - ` diff --git a/Doc/library/glob.rst b/Doc/library/glob.rst index 7e21f1b..320df28 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 ` - diff --git a/Doc/library/heapq.rst b/Doc/library/heapq.rst index f6b14ca..f59c3b8 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 - ` - 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 4d8a1f1..d86fef0 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 - ` diff --git a/Doc/library/linecache.rst b/Doc/library/linecache.rst index d8a9ff3..ee965fe 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 +**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 - ` - The :mod:`linecache` module defines the following functions: diff --git a/Doc/library/pprint.rst b/Doc/library/pprint.rst index 82648a1..58b6702 100644 --- a/Doc/library/pprint.rst +++ b/Doc/library/pprint.rst @@ -6,6 +6,7 @@ .. moduleauthor:: Fred L. Drake, Jr. .. sectionauthor:: Fred L. Drake, Jr. +**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 - ` - The :mod:`pprint` module defines one class: .. First the implementation class: diff --git a/Doc/library/queue.rst b/Doc/library/queue.rst index e3596bb..bc3821e 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 - ` diff --git a/Doc/library/random.rst b/Doc/library/random.rst index c5a5666..8525312 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 - ` - 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 94f7991..a76aacc 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 - ` - .. 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 de22833..499ab51 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 - ` .. function:: open(filename, flag='c', protocol=None, writeback=False) diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst index 0144876..759dab1 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 - ` - .. 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 0162779..904df29 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 - ` - +**Source code:** :source:`Lib/string.py` String constants ---------------- diff --git a/Doc/library/textwrap.rst b/Doc/library/textwrap.rst index 860f81f..74e5b2e 100644 --- a/Doc/library/textwrap.rst +++ b/Doc/library/textwrap.rst @@ -6,6 +6,7 @@ .. moduleauthor:: Greg Ward .. sectionauthor:: Greg Ward +**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 - ` - .. 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 3b1b1bf..03ff44c 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 - ` - This module defines the following functions and objects: diff --git a/Doc/library/tokenize.rst b/Doc/library/tokenize.rst index d7ae638..9c05439 100644 --- a/Doc/library/tokenize.rst +++ b/Doc/library/tokenize.rst @@ -6,17 +6,13 @@ .. moduleauthor:: Ka Ping Yee .. sectionauthor:: Fred L. Drake, Jr. +**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 - ` - The primary entry point is a :term:`generator`: .. function:: tokenize(readline) diff --git a/Doc/library/trace.rst b/Doc/library/trace.rst index 96f31e9..5a32482 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 - ` - .. _trace-cli: Command-Line Usage diff --git a/Doc/library/uu.rst b/Doc/library/uu.rst index ac5bca4..7c1d67c 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 ` -- cgit v0.12