From 71515ca191f32651c923c70e891632b4ac820b4f Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 17 May 2009 12:29:12 +0000 Subject: [PATCH] Remove surplus empty lines and convert more files to new optional arg style. --- Doc/library/abc.rst | 1 - Doc/library/allos.rst | 1 - Doc/library/archiving.rst | 1 - Doc/library/array.rst | 1 - Doc/library/asynchat.rst | 1 - Doc/library/asyncore.rst | 1 - Doc/library/atexit.rst | 1 - Doc/library/audioop.rst | 1 - Doc/library/base64.rst | 1 - Doc/library/binascii.rst | 1 - Doc/library/code.rst | 2 -- Doc/library/codeop.rst | 1 - Doc/library/collections.rst | 1 - Doc/library/compileall.rst | 1 - Doc/library/contextlib.rst | 1 - Doc/library/copy.rst | 1 - Doc/library/copyreg.rst | 3 +-- Doc/library/crypt.rst | 1 - Doc/library/crypto.rst | 1 - Doc/library/csv.rst | 1 - Doc/library/ctypes.rst | 5 ++--- Doc/library/curses.ascii.rst | 1 - Doc/library/curses.panel.rst | 5 ++--- Doc/library/curses.rst | 4 ++-- Doc/library/custominterp.rst | 1 - Doc/library/datatypes.rst | 1 - Doc/library/decimal.rst | 1 - Doc/library/development.rst | 1 - Doc/library/dis.rst | 11 +++++------ Doc/library/distutils.rst | 17 ++++++++--------- Doc/library/errno.rst | 1 - Doc/library/fcntl.rst | 15 +++++++-------- Doc/library/filecmp.rst | 10 +++++----- Doc/library/fileformats.rst | 1 - Doc/library/fileinput.rst | 4 ++-- Doc/library/filesys.rst | 1 - Doc/library/fnmatch.rst | 1 - Doc/library/formatter.rst | 8 ++++---- Doc/library/fpectl.rst | 1 - 39 files changed, 38 insertions(+), 74 deletions(-) diff --git a/Doc/library/abc.rst b/Doc/library/abc.rst index 29d37f34c0f..aa1cc7871e3 100644 --- a/Doc/library/abc.rst +++ b/Doc/library/abc.rst @@ -1,4 +1,3 @@ - :mod:`abc` --- Abstract Base Classes ==================================== diff --git a/Doc/library/allos.rst b/Doc/library/allos.rst index 6c5837d0dab..f25c3b8751a 100644 --- a/Doc/library/allos.rst +++ b/Doc/library/allos.rst @@ -1,4 +1,3 @@ - .. _allos: ********************************* diff --git a/Doc/library/archiving.rst b/Doc/library/archiving.rst index 7d0df5f575a..f2d08ada0cb 100644 --- a/Doc/library/archiving.rst +++ b/Doc/library/archiving.rst @@ -1,4 +1,3 @@ - .. _archiving: ****************************** diff --git a/Doc/library/array.rst b/Doc/library/array.rst index 49005096197..200277fe848 100644 --- a/Doc/library/array.rst +++ b/Doc/library/array.rst @@ -1,4 +1,3 @@ - :mod:`array` --- Efficient arrays of numeric values =================================================== diff --git a/Doc/library/asynchat.rst b/Doc/library/asynchat.rst index 4adaecf32e1..e511a052160 100644 --- a/Doc/library/asynchat.rst +++ b/Doc/library/asynchat.rst @@ -1,4 +1,3 @@ - :mod:`asynchat` --- Asynchronous socket command/response handler ================================================================ diff --git a/Doc/library/asyncore.rst b/Doc/library/asyncore.rst index 267c58b9bce..60d4d0336c0 100644 --- a/Doc/library/asyncore.rst +++ b/Doc/library/asyncore.rst @@ -1,4 +1,3 @@ - :mod:`asyncore` --- Asynchronous socket handler =============================================== diff --git a/Doc/library/atexit.rst b/Doc/library/atexit.rst index 74712ee04fd..db902187fb7 100644 --- a/Doc/library/atexit.rst +++ b/Doc/library/atexit.rst @@ -1,4 +1,3 @@ - :mod:`atexit` --- Exit handlers =============================== diff --git a/Doc/library/audioop.rst b/Doc/library/audioop.rst index fe6e86fc6c1..4af8536b86d 100644 --- a/Doc/library/audioop.rst +++ b/Doc/library/audioop.rst @@ -1,4 +1,3 @@ - :mod:`audioop` --- Manipulate raw audio data ============================================ diff --git a/Doc/library/base64.rst b/Doc/library/base64.rst index 1e789537404..62bf1d49f24 100644 --- a/Doc/library/base64.rst +++ b/Doc/library/base64.rst @@ -1,4 +1,3 @@ - :mod:`base64` --- RFC 3548: Base16, Base32, Base64 Data Encodings ================================================================= diff --git a/Doc/library/binascii.rst b/Doc/library/binascii.rst index 8488743fff1..c42f81f7179 100644 --- a/Doc/library/binascii.rst +++ b/Doc/library/binascii.rst @@ -1,4 +1,3 @@ - :mod:`binascii` --- Convert between binary and ASCII ==================================================== diff --git a/Doc/library/code.rst b/Doc/library/code.rst index 4219e9e7d7b..56214b9f722 100644 --- a/Doc/library/code.rst +++ b/Doc/library/code.rst @@ -1,4 +1,3 @@ - :mod:`code` --- Interpreter base classes ======================================== @@ -6,7 +5,6 @@ :synopsis: Facilities to implement read-eval-print loops. - The ``code`` module provides facilities to implement read-eval-print loops in Python. Two classes and convenience functions are included which can be used to build applications which provide an interactive interpreter prompt. diff --git a/Doc/library/codeop.rst b/Doc/library/codeop.rst index fb2f3264a57..9ae41764853 100644 --- a/Doc/library/codeop.rst +++ b/Doc/library/codeop.rst @@ -1,4 +1,3 @@ - :mod:`codeop` --- Compile Python code ===================================== diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst index fca84bd48fa..9dcf3028105 100644 --- a/Doc/library/collections.rst +++ b/Doc/library/collections.rst @@ -1,4 +1,3 @@ - :mod:`collections` --- Container datatypes ========================================== diff --git a/Doc/library/compileall.rst b/Doc/library/compileall.rst index 52f881b437f..83e418d30c5 100644 --- a/Doc/library/compileall.rst +++ b/Doc/library/compileall.rst @@ -1,4 +1,3 @@ - :mod:`compileall` --- Byte-compile Python libraries =================================================== diff --git a/Doc/library/contextlib.rst b/Doc/library/contextlib.rst index e2ca6a1a8ef..d6ce9a76316 100644 --- a/Doc/library/contextlib.rst +++ b/Doc/library/contextlib.rst @@ -1,4 +1,3 @@ - :mod:`contextlib` --- Utilities for :keyword:`with`\ -statement contexts. ========================================================================= diff --git a/Doc/library/copy.rst b/Doc/library/copy.rst index 554801f2e58..e6ad857a732 100644 --- a/Doc/library/copy.rst +++ b/Doc/library/copy.rst @@ -1,4 +1,3 @@ - :mod:`copy` --- Shallow and deep copy operations ================================================ diff --git a/Doc/library/copyreg.rst b/Doc/library/copyreg.rst index 60df3d0e896..f6dbaaf7457 100644 --- a/Doc/library/copyreg.rst +++ b/Doc/library/copyreg.rst @@ -1,6 +1,5 @@ - :mod:`copyreg` --- Register :mod:`pickle` support functions -============================================================ +=========================================================== .. module:: copyreg :synopsis: Register pickle support functions. diff --git a/Doc/library/crypt.rst b/Doc/library/crypt.rst index b6c3d212421..0be571eb513 100644 --- a/Doc/library/crypt.rst +++ b/Doc/library/crypt.rst @@ -1,4 +1,3 @@ - :mod:`crypt` --- Function to check Unix passwords ================================================= diff --git a/Doc/library/crypto.rst b/Doc/library/crypto.rst index dce5a01ac6d..8650094c576 100644 --- a/Doc/library/crypto.rst +++ b/Doc/library/crypto.rst @@ -1,4 +1,3 @@ - .. _crypto: ********************** diff --git a/Doc/library/csv.rst b/Doc/library/csv.rst index 87ed3b69d77..6bcee11c1d6 100644 --- a/Doc/library/csv.rst +++ b/Doc/library/csv.rst @@ -1,4 +1,3 @@ - :mod:`csv` --- CSV File Reading and Writing =========================================== diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst index e389a633315..ac2f2fd2932 100644 --- a/Doc/library/ctypes.rst +++ b/Doc/library/ctypes.rst @@ -1,6 +1,5 @@ - -:mod:`ctypes` --- A foreign function library for Python. -======================================================== +:mod:`ctypes` --- A foreign function library for Python +======================================================= .. module:: ctypes :synopsis: A foreign function library for Python. diff --git a/Doc/library/curses.ascii.rst b/Doc/library/curses.ascii.rst index cf51f78ab02..6bc1fb9ae3d 100644 --- a/Doc/library/curses.ascii.rst +++ b/Doc/library/curses.ascii.rst @@ -1,4 +1,3 @@ - :mod:`curses.ascii` --- Utilities for ASCII characters ====================================================== diff --git a/Doc/library/curses.panel.rst b/Doc/library/curses.panel.rst index 59e5b86f191..a3c8bda63c2 100644 --- a/Doc/library/curses.panel.rst +++ b/Doc/library/curses.panel.rst @@ -1,6 +1,5 @@ - -:mod:`curses.panel` --- A panel stack extension for curses. -=========================================================== +:mod:`curses.panel` --- A panel stack extension for curses +========================================================== .. module:: curses.panel :synopsis: A panel stack extension that adds depth to curses windows. diff --git a/Doc/library/curses.rst b/Doc/library/curses.rst index b16d667f769..03f8f8cb4a5 100644 --- a/Doc/library/curses.rst +++ b/Doc/library/curses.rst @@ -1,9 +1,9 @@ - :mod:`curses` --- Terminal handling for character-cell displays =============================================================== .. module:: curses - :synopsis: An interface to the curses library, providing portable terminal handling. + :synopsis: An interface to the curses library, providing portable + terminal handling. .. sectionauthor:: Moshe Zadka .. sectionauthor:: Eric Raymond diff --git a/Doc/library/custominterp.rst b/Doc/library/custominterp.rst index 2a9f0a44802..5eeced20a9a 100644 --- a/Doc/library/custominterp.rst +++ b/Doc/library/custominterp.rst @@ -1,4 +1,3 @@ - .. _custominterp: ************************** diff --git a/Doc/library/datatypes.rst b/Doc/library/datatypes.rst index 99d062b190e..6b4a71a3ad6 100644 --- a/Doc/library/datatypes.rst +++ b/Doc/library/datatypes.rst @@ -1,4 +1,3 @@ - .. _datatypes: ********** diff --git a/Doc/library/decimal.rst b/Doc/library/decimal.rst index a27fbf450d2..d548c0d1e14 100644 --- a/Doc/library/decimal.rst +++ b/Doc/library/decimal.rst @@ -1,4 +1,3 @@ - :mod:`decimal` --- Decimal fixed point and floating point arithmetic ==================================================================== diff --git a/Doc/library/development.rst b/Doc/library/development.rst index 8cd3d0cc991..c822e0844f3 100644 --- a/Doc/library/development.rst +++ b/Doc/library/development.rst @@ -1,4 +1,3 @@ - .. _development: ***************** diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst index c5a7ea8fc30..8d4d9561622 100644 --- a/Doc/library/dis.rst +++ b/Doc/library/dis.rst @@ -1,4 +1,3 @@ - :mod:`dis` --- Disassembler for Python bytecode =============================================== @@ -6,11 +5,11 @@ :synopsis: Disassembler for Python bytecode. -The :mod:`dis` module supports the analysis of Python :term:`bytecode` by disassembling -it. Since there is no Python assembler, this module defines the Python assembly -language. The Python 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. +The :mod:`dis` module supports the analysis of Python :term:`bytecode` by +disassembling it. Since there is no Python assembler, this module defines the +Python assembly language. The Python 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. Example: Given the function :func:`myfunc`:: diff --git a/Doc/library/distutils.rst b/Doc/library/distutils.rst index 534faab4073..238b79dac2b 100644 --- a/Doc/library/distutils.rst +++ b/Doc/library/distutils.rst @@ -1,10 +1,9 @@ - :mod:`distutils` --- Building and installing Python modules =========================================================== .. module:: distutils - :synopsis: Support for building and installing Python modules into an existing Python - installation. + :synopsis: Support for building and installing Python modules into an + existing Python installation. .. sectionauthor:: Fred L. Drake, Jr. @@ -19,12 +18,12 @@ This package is discussed in two separate chapters: .. seealso:: :ref:`distutils-index` - The manual for developers and packagers of Python modules. This describes how - to prepare :mod:`distutils`\ -based packages so that they may be easily - installed into an existing Python installation. + The manual for developers and packagers of Python modules. This describes + how to prepare :mod:`distutils`\ -based packages so that they may be + easily installed into an existing Python installation. :ref:`install-index` - An "administrators" manual which includes information on installing modules into - an existing Python installation. You do not need to be a Python programmer to - read this manual. + An "administrators" manual which includes information on installing + modules into an existing Python installation. You do not need to be a + Python programmer to read this manual. diff --git a/Doc/library/errno.rst b/Doc/library/errno.rst index daf9ff02d5d..d2163b62582 100644 --- a/Doc/library/errno.rst +++ b/Doc/library/errno.rst @@ -1,4 +1,3 @@ - :mod:`errno` --- Standard errno system symbols ============================================== diff --git a/Doc/library/fcntl.rst b/Doc/library/fcntl.rst index 0e6940709e4..a397afc1d8a 100644 --- a/Doc/library/fcntl.rst +++ b/Doc/library/fcntl.rst @@ -1,4 +1,3 @@ - :mod:`fcntl` --- The :func:`fcntl` and :func:`ioctl` system calls ================================================================= @@ -65,13 +64,13 @@ The module defines the following functions: so long as the buffer you pass is as least as long as what the operating system wants to put there, things should work. - If *mutate_flag* is true (the default), then the buffer is (in effect) passed to the - underlying :func:`ioctl` system call, the latter's return code is passed back to - the calling Python, and the buffer's new contents reflect the action of the - :func:`ioctl`. This is a slight simplification, because if the supplied buffer - is less than 1024 bytes long it is first copied into a static buffer 1024 bytes - long which is then passed to :func:`ioctl` and copied back into the supplied - buffer. + If *mutate_flag* is true (the default), then the buffer is (in effect) passed + to the underlying :func:`ioctl` system call, the latter's return code is + passed back to the calling Python, and the buffer's new contents reflect the + action of the :func:`ioctl`. This is a slight simplification, because if the + supplied buffer is less than 1024 bytes long it is first copied into a static + buffer 1024 bytes long which is then passed to :func:`ioctl` and copied back + into the supplied buffer. An example:: diff --git a/Doc/library/filecmp.rst b/Doc/library/filecmp.rst index 11d74ba770c..f57dcceff0a 100644 --- a/Doc/library/filecmp.rst +++ b/Doc/library/filecmp.rst @@ -1,4 +1,3 @@ - :mod:`filecmp` --- File and Directory Comparisons ================================================= @@ -14,7 +13,7 @@ see also the :mod:`difflib` module. The :mod:`filecmp` module defines the following functions: -.. function:: cmp(f1, f2[, shallow]) +.. function:: cmp(f1, f2, shallow=True) Compare the files named *f1* and *f2*, returning ``True`` if they seem equal, ``False`` otherwise. @@ -29,7 +28,7 @@ The :mod:`filecmp` module defines the following functions: portability and efficiency. -.. function:: cmpfiles(dir1, dir2, common[, shallow]) +.. function:: cmpfiles(dir1, dir2, common, shallow=True) Compare the files in the two directories *dir1* and *dir2* whose names are given by *common*. @@ -66,7 +65,7 @@ The :class:`dircmp` class :class:`dircmp` instances are built using this constructor: -.. class:: dircmp(a, b[, ignore[, hide]]) +.. class:: dircmp(a, b, ignore=None, hide=None) Construct a new directory comparison object, to compare the directories *a* and *b*. *ignore* is a list of names to ignore, and defaults to ``['RCS', 'CVS', @@ -159,5 +158,6 @@ The :class:`dircmp` class .. attribute:: subdirs - A dictionary mapping names in :attr:`common_dirs` to :class:`dircmp` objects. + A dictionary mapping names in :attr:`common_dirs` to :class:`dircmp` + objects. diff --git a/Doc/library/fileformats.rst b/Doc/library/fileformats.rst index dc2e2374452..980d4f5ffb3 100644 --- a/Doc/library/fileformats.rst +++ b/Doc/library/fileformats.rst @@ -1,4 +1,3 @@ - .. _fileformats: ************ diff --git a/Doc/library/fileinput.rst b/Doc/library/fileinput.rst index 76d5d6f0cd2..d98a198f5c7 100644 --- a/Doc/library/fileinput.rst +++ b/Doc/library/fileinput.rst @@ -47,7 +47,7 @@ provided by this module. The following function is the primary interface of this module: -.. function:: input([files[, inplace[, backup[, mode[, openhook]]]]]) +.. function:: input(files=None, inplace=False, backup='', bufsize=0, mode='r', openhook=None) Create an instance of the :class:`FileInput` class. The instance will be used as global state for the functions of this module, and is also returned to use @@ -115,7 +115,7 @@ The class which implements the sequence behavior provided by the module is available for subclassing as well: -.. class:: FileInput([files[, inplace[, backup[, mode[, openhook]]]]]) +.. class:: FileInput(files=None, inplace=False, backup='', bufsize=0, mode='r', openhook=None) Class :class:`FileInput` is the implementation; its methods :meth:`filename`, :meth:`fileno`, :meth:`lineno`, :meth:`filelineno`, :meth:`isfirstline`, diff --git a/Doc/library/filesys.rst b/Doc/library/filesys.rst index 41f77168ca8..b341f5fd8eb 100644 --- a/Doc/library/filesys.rst +++ b/Doc/library/filesys.rst @@ -1,4 +1,3 @@ - .. _filesys: ************************* diff --git a/Doc/library/fnmatch.rst b/Doc/library/fnmatch.rst index 1bb2cf2b108..7561880b76f 100644 --- a/Doc/library/fnmatch.rst +++ b/Doc/library/fnmatch.rst @@ -1,4 +1,3 @@ - :mod:`fnmatch` --- Unix filename pattern matching ================================================= diff --git a/Doc/library/formatter.rst b/Doc/library/formatter.rst index c983ccc8387..0a459a60cbf 100644 --- a/Doc/library/formatter.rst +++ b/Doc/library/formatter.rst @@ -165,7 +165,7 @@ The following attributes are defined for formatter instance objects: :const:`AS_IS` values, is passed to the writer's :meth:`new_styles` method. -.. method:: formatter.pop_style([n=1]) +.. method:: formatter.pop_style(n=1) Pop the last *n* style specifications passed to :meth:`push_style`. A tuple representing the revised stack, including :const:`AS_IS` values, is passed to @@ -177,7 +177,7 @@ The following attributes are defined for formatter instance objects: Set the spacing style for the writer. -.. method:: formatter.assert_line_data([flag=1]) +.. method:: formatter.assert_line_data(flag=1) Inform the formatter that data has been added to the current paragraph out-of-band. This should be used when the writer has been manipulated @@ -194,7 +194,7 @@ Two implementations of formatter objects are provided by this module. Most applications may use one of these classes without modification or subclassing. -.. class:: NullFormatter([writer]) +.. class:: NullFormatter(writer=None) A formatter which does nothing. If *writer* is omitted, a :class:`NullWriter` instance is created. No methods of the writer are called by @@ -337,7 +337,7 @@ this module. Most applications will need to derive new writer classes from the output. -.. class:: DumbWriter([file[, maxcol=72]]) +.. class:: DumbWriter(file=None, maxcol=72) Simple writer class which writes output on the file object passed in as *file* or, if *file* is omitted, on standard output. The output is simply word-wrapped diff --git a/Doc/library/fpectl.rst b/Doc/library/fpectl.rst index ef030f0034d..fb15f694450 100644 --- a/Doc/library/fpectl.rst +++ b/Doc/library/fpectl.rst @@ -1,4 +1,3 @@ - :mod:`fpectl` --- Floating point exception control ==================================================