Anonymous avatar Anonymous committed d41c2af

Fix a whole load of markup glitches introduced mostly by the converter.

Many thanks to Tim Hatch for finding them, and thanks to Emacs for making it easy to fix them :)

Comments (0)

Files changed (261)

Doc-26/c-api/abstract.rst

 either is not a class object, a more general mechanism is used to determine the
 class relationship of the two objects.  When testing if *B* is a subclass of
 *A*, if *A* is *B*, :cfunc:`PyObject_IsSubclass` returns true.  If *A* and *B*
-are different objects, *B*'s :attr:`__bases__` attribute is searched in a depth-
-first fashion for *A* --- the presence of the :attr:`__bases__` attribute is
-considered sufficient for this determination.
+are different objects, *B*'s :attr:`__bases__` attribute is searched in a
+depth-first fashion for *A* --- the presence of the :attr:`__bases__` attribute
+is considered sufficient for this determination.
 
 
 .. cfunction:: int PyObject_IsSubclass(PyObject *derived, PyObject *cls)

Doc-26/c-api/concrete.rst

 
    Rich compare two unicode strings and return one of the following:
 
-* ``NULL`` in case an exception was raised
-
-* :const:`Py_True` or :const:`Py_False` for successful comparisons
-
-* :const:`Py_NotImplemented` in case the type combination is unknown
+   * ``NULL`` in case an exception was raised
+   * :const:`Py_True` or :const:`Py_False` for successful comparisons
+   * :const:`Py_NotImplemented` in case the type combination is unknown
 
    Note that :const:`Py_EQ` and :const:`Py_NE` comparisons can cause a
    :exc:`UnicodeWarning` in case the conversion of the arguments to Unicode fails
 
    .. index:: single: EOFError (built-in exception)
 
-   Equivalent to ``p.readline([*n*])``, this function reads one line from the
+   Equivalent to ``p.readline([n])``, this function reads one line from the
    object *p*.  *p* may be a file object or any object with a :meth:`readline`
    method.  If *n* is ``0``, exactly one line is read, regardless of the length of
    the line.  If *n* is greater than ``0``, no more than *n* bytes will be read
 
 .. cvar:: PyTypeObject PySeqIter_Type
 
-   Type object for iterator objects returned by :cfunc:`PySeqIter_New` and the one-
-   argument form of the :func:`iter` built-in function for built-in sequence types.
+   Type object for iterator objects returned by :cfunc:`PySeqIter_New` and the
+   one-argument form of the :func:`iter` built-in function for built-in sequence
+   types.
 
    .. versionadded:: 2.2
 
 
 .. cfunction:: PyObject* PyWeakref_NewRef(PyObject *ob, PyObject *callback)
 
-   Return a weak reference object for the object *ob*.  This will always return a
-   new reference, but is not guaranteed to create a new object; an existing
+   Return a weak reference object for the object *ob*.  This will always return
+   a new reference, but is not guaranteed to create a new object; an existing
    reference object may be returned.  The second parameter, *callback*, can be a
    callable object that receives notification when *ob* is garbage collected; it
    should accept a single parameter, which will be the weak reference object
-   itself. *callback* may also be ``None`` or *NULL*.  If *ob* is not a weakly-
-   referencable object, or if *callback* is not callable, ``None``, or *NULL*, this
-   will return *NULL* and raise :exc:`TypeError`.
+   itself. *callback* may also be ``None`` or *NULL*.  If *ob* is not a
+   weakly-referencable object, or if *callback* is not callable, ``None``, or
+   *NULL*, this will return *NULL* and raise :exc:`TypeError`.
 
    .. versionadded:: 2.2
 
 
    Return a weak reference proxy object for the object *ob*.  This will always
    return a new reference, but is not guaranteed to create a new object; an
-   existing proxy object may be returned.  The second parameter, *callback*, can be
-   a callable object that receives notification when *ob* is garbage collected; it
-   should accept a single parameter, which will be the weak reference object
-   itself. *callback* may also be ``None`` or *NULL*.  If *ob* is not a weakly-
-   referencable object, or if *callback* is not callable, ``None``, or *NULL*, this
-   will return *NULL* and raise :exc:`TypeError`.
+   existing proxy object may be returned.  The second parameter, *callback*, can
+   be a callable object that receives notification when *ob* is garbage
+   collected; it should accept a single parameter, which will be the weak
+   reference object itself. *callback* may also be ``None`` or *NULL*.  If *ob*
+   is not a weakly-referencable object, or if *callback* is not callable,
+   ``None``, or *NULL*, this will return *NULL* and raise :exc:`TypeError`.
 
    .. versionadded:: 2.2
 

Doc-26/c-api/init.rst

    ``sys.stdout`` and ``sys.stderr`` (however these refer to the same underlying
    :ctype:`FILE` structures in the C library).
 
-   The return value points to the first thread state created in the new sub-
-   interpreter.  This thread state is made in the current thread state.  Note that
-   no actual thread is created; see the discussion of thread states below.  If
-   creation of the new interpreter is unsuccessful, *NULL* is returned; no
-   exception is set since the exception state is stored in the current thread state
-   and there may not be a current thread state.  (Like all other Python/C API
-   functions, the global interpreter lock must be held before calling this function
-   and is still held when it returns; however, unlike most other Python/C API
-   functions, there needn't be a current thread state on entry.)
+   The return value points to the first thread state created in the new
+   sub-interpreter.  This thread state is made in the current thread state.
+   Note that no actual thread is created; see the discussion of thread states
+   below.  If creation of the new interpreter is unsuccessful, *NULL* is
+   returned; no exception is set since the exception state is stored in the
+   current thread state and there may not be a current thread state.  (Like all
+   other Python/C API functions, the global interpreter lock must be held before
+   calling this function and is still held when it returns; however, unlike most
+   other Python/C API functions, there needn't be a current thread state on
+   entry.)
 
    .. index::
       single: Py_Finalize()
       single: main()
       single: Py_GetPath()
 
-   This function should be called before :cfunc:`Py_Initialize` is called for the
-   first time, if it is called at all.  It tells the interpreter the value of the
-   ``argv[0]`` argument to the :cfunc:`main` function of the program.  This is used
-   by :cfunc:`Py_GetPath` and some other functions below to find the Python run-
-   time libraries relative to the interpreter executable.  The default value is
-   ``'python'``.  The argument should point to a zero-terminated character string
-   in static storage whose contents will not change for the duration of the
-   program's execution.  No code in the Python interpreter will change the contents
-   of this storage.
+   This function should be called before :cfunc:`Py_Initialize` is called for
+   the first time, if it is called at all.  It tells the interpreter the value
+   of the ``argv[0]`` argument to the :cfunc:`main` function of the program.
+   This is used by :cfunc:`Py_GetPath` and some other functions below to find
+   the Python run-time libraries relative to the interpreter executable.  The
+   default value is ``'python'``.  The argument should point to a
+   zero-terminated character string in static storage whose contents will not
+   change for the duration of the program's execution.  No code in the Python
+   interpreter will change the contents of this storage.
 
 
 .. cfunction:: char* Py_GetProgramName()
    single: interpreter lock
    single: lock, interpreter
 
-The Python interpreter is not fully thread safe.  In order to support multi-
-threaded Python programs, there's a global lock that must be held by the current
-thread before it can safely access Python objects. Without the lock, even the
-simplest operations could cause problems in a multi-threaded program: for
-example, when two threads simultaneously increment the reference count of the
-same object, the reference count could end up being incremented only once
+The Python interpreter is not fully thread safe.  In order to support
+multi-threaded Python programs, there's a global lock that must be held by the
+current thread before it can safely access Python objects. Without the lock,
+even the simplest operations could cause problems in a multi-threaded program:
+for example, when two threads simultaneously increment the reference count of
+the same object, the reference count could end up being incremented only once
 instead of twice.
 
 .. index:: single: setcheckinterval() (in module sys)

Doc-26/c-api/intro.rst

 
 To include the headers, place both directories (if different) on your compiler's
 search path for includes.  Do *not* place the parent directories on the search
-path and then use ``#include <python|version|/Python.h>``; this will break on
+path and then use ``#include <pythonX.Y/Python.h>``; this will break on
 multi-platform builds since the platform independent headers under
 :envvar:`prefix` include the platform specific headers from
 :envvar:`exec_prefix`.
 
 .. index:: single: exc_info() (in module sys)
 
-Note that starting with Python 1.5, the preferred, thread-safe way to  access
-the exception state from Python code is to call the function
-:func:`sys.exc_info`, which returns the per-thread exception state  for Python
-code.  Also, the semantics of both ways to access the  exception state have
-changed so that a function which catches an  exception will save and restore its
-thread's exception state so as to  preserve the exception state of its caller.
-This prevents common bugs  in exception handling code caused by an innocent-
-looking function  overwriting the exception being handled; it also reduces the
-often  unwanted lifetime extension for objects that are referenced by the  stack
-frames in the traceback.
+Note that starting with Python 1.5, the preferred, thread-safe way to access the
+exception state from Python code is to call the function :func:`sys.exc_info`,
+which returns the per-thread exception state for Python code.  Also, the
+semantics of both ways to access the exception state have changed so that a
+function which catches an exception will save and restore its thread's exception
+state so as to preserve the exception state of its caller.  This prevents common
+bugs in exception handling code caused by an innocent-looking function
+overwriting the exception being handled; it also reduces the often unwanted
+lifetime extension for objects that are referenced by the stack frames in the
+traceback.
 
 As a general principle, a function that calls another function to  perform some
 task should check whether the called function raised an  exception, and if so,
 based upon its best guess for the location of the standard Python interpreter
 executable, assuming that the Python library is found in a fixed location
 relative to the Python interpreter executable.  In particular, it looks for a
-directory named :file:`lib/python|version|` relative to the parent directory
+directory named :file:`lib/python{X.Y}` relative to the parent directory
 where the executable named :file:`python` is found on the shell command search
 path (the environment variable :envvar:`PATH`).
 
 For instance, if the Python executable is found in
 :file:`/usr/local/bin/python`, it will assume that the libraries are in
-:file:`/usr/local/lib/python|version|`.  (In fact, this particular path is also
+:file:`/usr/local/lib/python{X.Y}`.  (In fact, this particular path is also
 the "fallback" location, used when no executable file named :file:`python` is
 found along :envvar:`PATH`.)  The user can override this behavior by setting the
 environment variable :envvar:`PYTHONHOME`, or insert additional directories in
 Compiling the interpreter with the :cmacro:`Py_DEBUG` macro defined produces
 what is generally meant by "a debug build" of Python. :cmacro:`Py_DEBUG` is
 enabled in the Unix build by adding :option:`--with-pydebug` to the
-:file:`configure` command.  It is also implied by the presence of the not-
-Python-specific :cmacro:`_DEBUG` macro.  When :cmacro:`Py_DEBUG` is enabled in
-the Unix build, compiler optimization is disabled.
+:file:`configure` command.  It is also implied by the presence of the
+not-Python-specific :cmacro:`_DEBUG` macro.  When :cmacro:`Py_DEBUG` is enabled
+in the Unix build, compiler optimization is disabled.
 
 In addition to the reference count debugging described below, the following
 extra checks are performed:

Doc-26/c-api/newtypes.rst

    The basic size does not include the GC header size (this is new in Python 2.2;
    in 2.1 and 2.0, the GC header size was included in :attr:`tp_basicsize`).
 
-   These fields are inherited separately by subtypes.  If the base type has a non-
-   zero :attr:`tp_itemsize`, it is generally not safe to set :attr:`tp_itemsize` to
-   a different non-zero value in a subtype (though this depends on the
-   implementation of the base type).
+   These fields are inherited separately by subtypes.  If the base type has a
+   non-zero :attr:`tp_itemsize`, it is generally not safe to set
+   :attr:`tp_itemsize` to a different non-zero value in a subtype (though this
+   depends on the implementation of the base type).
 
    A note about alignment: if the variable items require a particular alignment,
    this should be taken care of by the value of :attr:`tp_basicsize`.  Example:

Doc-26/c-api/utilities.rst

    Unicode into a character buffer. It only works for encoded data without embedded
    NUL bytes.
 
-   This format requires two arguments.  The first is only used as input, and must
-   be a :ctype:`const char\*` which points to the name of an encoding as a NUL-
-   terminated string, or *NULL*, in which case the default encoding is used.  An
-   exception is raised if the named encoding is not known to Python.  The second
-   argument must be a :ctype:`char\*\*`; the value of the pointer it references
-   will be set to a buffer with the contents of the argument text.  The text will
-   be encoded in the encoding specified by the first argument.
+   This format requires two arguments.  The first is only used as input, and
+   must be a :ctype:`const char\*` which points to the name of an encoding as a
+   NUL-terminated string, or *NULL*, in which case the default encoding is used.
+   An exception is raised if the named encoding is not known to Python.  The
+   second argument must be a :ctype:`char\*\*`; the value of the pointer it
+   references will be set to a buffer with the contents of the argument text.
+   The text will be encoded in the encoding specified by the first argument.
 
    :cfunc:`PyArg_ParseTuple` will allocate a buffer of the needed size, copy the
    encoded data into this buffer and adjust *\*buffer* to reference the newly
    input data which contains NUL characters.
 
    It requires three arguments.  The first is only used as input, and must be a
-   :ctype:`const char\*` which points to the name of an encoding as a NUL-
-   terminated string, or *NULL*, in which case the default encoding is used.  An
-   exception is raised if the named encoding is not known to Python.  The second
-   argument must be a :ctype:`char\*\*`; the value of the pointer it references
-   will be set to a buffer with the contents of the argument text.  The text will
-   be encoded in the encoding specified by the first argument.  The third argument
-   must be a pointer to an integer; the referenced integer will be set to the
-   number of bytes in the output buffer.
+   :ctype:`const char\*` which points to the name of an encoding as a
+   NUL-terminated string, or *NULL*, in which case the default encoding is used.
+   An exception is raised if the named encoding is not known to Python.  The
+   second argument must be a :ctype:`char\*\*`; the value of the pointer it
+   references will be set to a buffer with the contents of the argument text.
+   The text will be encoded in the encoding specified by the first argument.
+   The third argument must be a pointer to an integer; the referenced integer
+   will be set to the number of bytes in the output buffer.
 
    There are two modes of operation:
 
 The return value (*rv*) for these functions should be interpreted as follows:
 
 * When ``0 <= rv < size``, the output conversion was successful and *rv*
-  characters were written to *str* (excluding the trailing ``'\\0'`` byte at
+  characters were written to *str* (excluding the trailing ``'\0'`` byte at
   *str*[*rv*]).
 
 * When ``rv >= size``, the output conversion was truncated and a buffer with
-  ``rv + 1`` bytes would have been needed to succeed. *str*[*size*-1] is ``'\\0'``
+  ``rv + 1`` bytes would have been needed to succeed. *str*[*size*-1] is ``'\0'``
   in this case.
 
-* When ``rv < 0``, "something bad happened." *str*[*size*-1] is ``'\\0'`` in
+* When ``rv < 0``, "something bad happened." *str*[*size*-1] is ``'\0'`` in
   this case too, but the rest of *str* is undefined. The exact cause of the error
   depends on the underlying platform.
 

Doc-26/distutils/apiref.rst

    +--------------------+--------------------------------+-------------------------------------------------------------+
 
 
-.. function:: run_setup(script_name[, script_args=``None``, stop_after=``'run'``])
+.. function:: run_setup(script_name[, script_args=None, stop_after='run'])
 
    Run a setup script in a somewhat controlled environment, and return  the
    :class:`distutils.dist.Distribution` instance that drives things.   This is
    to :command:`build`, :command:`build_ext`, :command:`build_clib`).
 
 
-.. class:: CCompiler([verbose=``0``, dry_run=``0``, force=``0``])
+.. class:: CCompiler([verbose=0, dry_run=0, force=0])
 
    The abstract base class :class:`CCompiler` defines the interface that  must be
    implemented by real compiler classes.  The class also has  some utility methods
       runtime linker may search by default.
 
 
-   .. method:: CCompiler.define_macro(name[, value=``None``])
+   .. method:: CCompiler.define_macro(name[, value=None])
 
       Define a preprocessor macro for all compilations driven by this compiler object.
       The optional parameter *value* should be a string; if it is not supplied, then
    .. method:: CCompiler.undefine_macro(name)
 
       Undefine a preprocessor macro for all compilations driven by this compiler
-      object.  If the same macro is defined by :meth:`define_macro` and undefined by
-      :meth:`undefine_macro`  the last call takes precedence (including multiple
-      redefinitions or undefinitions).  If the macro is redefined/undefined on a per-
-      compilation basis (ie. in the call to :meth:`compile`), then that takes
-      precedence.
+      object.  If the same macro is defined by :meth:`define_macro` and
+      undefined by :meth:`undefine_macro` the last call takes precedence
+      (including multiple redefinitions or undefinitions).  If the macro is
+      redefined/undefined on a per-compilation basis (ie. in the call to
+      :meth:`compile`), then that takes precedence.
 
 
    .. method:: CCompiler.add_link_object(object)
       list) to do the job.
 
 
-   .. method:: CCompiler.find_library_file(dirs, lib[, debug=``0``])
+   .. method:: CCompiler.find_library_file(dirs, lib[, debug=0])
 
       Search the specified list of directories for a static or shared library file
       *lib* and return the full path to that file.  If *debug* is true, look for a
       ``None`` if *lib* wasn't found in any of the specified directories.
 
 
-   .. method:: CCompiler.has_function(funcname [, includes=``None``, include_dirs=``None``, libraries=``None``, library_dirs=``None``])
+   .. method:: CCompiler.has_function(funcname [, includes=None, include_dirs=None, libraries=None, library_dirs=None])
 
       Return a boolean indicating whether *funcname* is supported on the current
       platform.  The optional arguments can be used to augment the compilation
    The following methods invoke stages in the build process.
 
 
-   .. method:: CCompiler.compile(sources[, output_dir=``None``, macros=``None``, include_dirs=``None``, debug=``0``, extra_preargs=``None``, extra_postargs=``None``, depends=``None``])
+   .. method:: CCompiler.compile(sources[, output_dir=None, macros=None, include_dirs=None, debug=0, extra_preargs=None, extra_postargs=None, depends=None])
 
       Compile one or more source files. Generates object files (e.g.  transforms a
       :file:`.c` file to a :file:`.o` file.)
       Raises :exc:`CompileError` on failure.
 
 
-   .. method:: CCompiler.create_static_lib(objects, output_libname[, output_dir=``None``, debug=``0``, target_lang=``None``])
+   .. method:: CCompiler.create_static_lib(objects, output_libname[, output_dir=None, debug=0, target_lang=None])
 
       Link a bunch of stuff together to create a static library file. The "bunch of
       stuff" consists of the list of object files supplied as *objects*, the extra
       Raises :exc:`LibError` on failure.
 
 
-   .. method:: CCompiler.link(target_desc, objects, output_filename[, output_dir=``None``, libraries=``None``, library_dirs=``None``, runtime_library_dirs=``None``, export_symbols=``None``, debug=``0``, extra_preargs=``None``, extra_postargs=``None``, build_temp=``None``, target_lang=``None``])
+   .. method:: CCompiler.link(target_desc, objects, output_filename[, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None, build_temp=None, target_lang=None])
 
       Link a bunch of stuff together to create an executable or shared library file.
 
       Raises :exc:`LinkError` on failure.
 
 
-   .. method:: CCompiler.link_executable(objects, output_progname[, output_dir=``None``, libraries=``None``, library_dirs=``None``, runtime_library_dirs=``None``, debug=``0``, extra_preargs=``None``, extra_postargs=``None``, target_lang=``None``])
+   .. method:: CCompiler.link_executable(objects, output_progname[, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, debug=0, extra_preargs=None, extra_postargs=None, target_lang=None])
 
       Link an executable.  *output_progname* is the name of the file executable, while
       *objects* are a list of object filenames to link in. Other arguments  are as for
       the :meth:`link` method.
 
 
-   .. method:: CCompiler.link_shared_lib(objects, output_libname[, output_dir=``None``, libraries=``None``, library_dirs=``None``, runtime_library_dirs=``None``, export_symbols=``None``, debug=``0``, extra_preargs=``None``, extra_postargs=``None``, build_temp=``None``, target_lang=``None``])
+   .. method:: CCompiler.link_shared_lib(objects, output_libname[, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None, build_temp=None, target_lang=None])
 
       Link a shared library. *output_libname* is the name of the output  library,
       while *objects* is a list of object filenames to link in.  Other arguments are
       as for the :meth:`link` method.
 
 
-   .. method:: CCompiler.link_shared_object(objects, output_filename[, output_dir=``None``, libraries=``None``, library_dirs=``None``, runtime_library_dirs=``None``, export_symbols=``None``, debug=``0``, extra_preargs=``None``, extra_postargs=``None``, build_temp=``None``, target_lang=``None``])
+   .. method:: CCompiler.link_shared_object(objects, output_filename[, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None, build_temp=None, target_lang=None])
 
       Link a shared object. *output_filename* is the name of the shared object that
       will be created, while *objects* is a list of object filenames  to link in.
       Other arguments are as for the :meth:`link` method.
 
 
-   .. method:: CCompiler.preprocess(source[, output_file=``None``, macros=``None``, include_dirs=``None``, extra_preargs=``None``, extra_postargs=``None``])
+   .. method:: CCompiler.preprocess(source[, output_file=None, macros=None, include_dirs=None, extra_preargs=None, extra_postargs=None])
 
       Preprocess a single C/C++ source file, named in *source*. Output will be written
       to file named *output_file*, or *stdout* if *output_file* not supplied.
    use by the various concrete subclasses.
 
 
-   .. method:: CCompiler.executable_filename(basename[, strip_dir=``0``, output_dir=``''``])
+   .. method:: CCompiler.executable_filename(basename[, strip_dir=0, output_dir=''])
 
       Returns the filename of the executable for the given *basename*.  Typically for
       non-Windows platforms this is the same as the basename,  while Windows will get
       a :file:`.exe` added.
 
 
-   .. method:: CCompiler.library_filename(libname[, lib_type=``'static'``, strip_dir=``0``, output_dir=``''``])
+   .. method:: CCompiler.library_filename(libname[, lib_type='static', strip_dir=0, output_dir=''])
 
       Returns the filename for the given library name on the current platform. On Unix
       a library with *lib_type* of ``'static'`` will typically  be of the form
       :file:`liblibname.so`.
 
 
-   .. method:: CCompiler.object_filenames(source_filenames[, strip_dir=``0``, output_dir=``''``])
+   .. method:: CCompiler.object_filenames(source_filenames[, strip_dir=0, output_dir=''])
 
       Returns the name of the object files for the given source files.
       *source_filenames* should be a list of filenames.
 
 
-   .. method:: CCompiler.shared_object_filename(basename[, strip_dir=``0``, output_dir=``''``])
+   .. method:: CCompiler.shared_object_filename(basename[, strip_dir=0, output_dir=''])
 
       Returns the name of a shared object file for the given file name *basename*.
 
 
-   .. method:: CCompiler.execute(func, args[, msg=``None``, level=``1``])
+   .. method:: CCompiler.execute(func, args[, msg=None, level=1])
 
       Invokes :func:`distutils.util.execute` This method invokes a  Python function
       *func* with the given arguments *args*, after  logging and taking into account
       the given command. XXX see also.
 
 
-   .. method:: CCompiler.mkpath(name[, mode=``511``])
+   .. method:: CCompiler.mkpath(name[, mode=511])
 
       Invokes :func:`distutils.dir_util.mkpath`. This creates a directory  and any
       missing ancestor directories. XXX see also.
       also.
 
 
-   .. method:: CCompiler.announce(msg[, level=``1``])
+   .. method:: CCompiler.announce(msg[, level=1])
 
       Write a message using :func:`distutils.log.debug`. XXX see also.
 
 tarballs or zipfiles.
 
 
-.. function:: make_archive(base_name, format[, root_dir=``None``, base_dir=``None``, verbose=``0``, dry_run=``0``])
+.. function:: make_archive(base_name, format[, root_dir=None, base_dir=None, verbose=0, dry_run=0])
 
    Create an archive file (eg. ``zip`` or ``tar``).  *base_name*  is the name of
    the file to create, minus any format-specific extension;  *format* is the
       This should be changed to support bz2 files
 
 
-.. function:: make_tarball(base_name, base_dir[, compress=``'gzip'``, verbose=``0``, dry_run=``0``])
+.. function:: make_tarball(base_name, base_dir[, compress='gzip', verbose=0, dry_run=0])
 
    'Create an (optional compressed) archive as a tar file from all files in and
    under *base_dir*. *compress* must be ``'gzip'`` (the default),  ``'compress'``,
       This should be replaced with calls to the :mod:`tarfile` module.
 
 
-.. function:: make_zipfile(base_name, base_dir[, verbose=``0``, dry_run=``0``])
+.. function:: make_zipfile(base_name, base_dir[, verbose=0, dry_run=0])
 
    Create a zip file from all files in and under *base_dir*.  The output zip file
    will be named *base_dir* + :file:`.zip`.  Uses either the  :mod:`zipfile` Python
    .. % % equivalent to a listcomp...
 
 
-.. function:: newer_group(sources, target[, missing=``'error'``])
+.. function:: newer_group(sources, target[, missing='error'])
 
    Return true if *target* is out-of-date with respect to any file listed in
    *sources*  In other words, if *target* exists and is newer than every file in
 directories.
 
 
-.. function:: mkpath(name[, mode=``0777``, verbose=``0``, dry_run=``0``])
+.. function:: mkpath(name[, mode=0777, verbose=0, dry_run=0])
 
    Create a directory and any missing ancestor directories.  If the directory
    already exists (or if *name* is the empty string, which means the current
    directories actually created.
 
 
-.. function:: create_tree(base_dir, files[, mode=``0777``, verbose=``0``, dry_run=``0``])
+.. function:: create_tree(base_dir, files[, mode=0777, verbose=0, dry_run=0])
 
    Create all the empty directories under *base_dir* needed to put *files* there.
    *base_dir* is just the a name of a directory which doesn't necessarily exist
    :func:`mkpath`.
 
 
-.. function:: copy_tree(src, dst[preserve_mode=``1``, preserve_times=``1``, preserve_symlinks=``0``, update=``0``, verbose=``0``, dry_run=``0``])
+.. function:: copy_tree(src, dst[, preserve_mode=1, preserve_times=1, preserve_symlinks=0, update=0, verbose=0, dry_run=0])
 
    Copy an entire directory tree *src* to a new location *dst*.  Both *src* and
    *dst* must be directory names.  If *src* is not a directory, raise
    as for :func:`copy_file`.
 
 
-.. function:: remove_tree(directory[verbose=``0``, dry_run=``0``])
+.. function:: remove_tree(directory[, verbose=0, dry_run=0])
 
    Recursively remove *directory* and all files and directories underneath it. Any
    errors are ignored (apart from being reported to ``sys.stdout`` if *verbose* is
 This module contains some utility functions for operating on individual files.
 
 
-.. function:: copy_file(src, dst[preserve_mode=``1``, preserve_times=``1``, update=``0``, link=``None``, verbose=``0``, dry_run=``0``])
+.. function:: copy_file(src, dst[, preserve_mode=1, preserve_times=1, update=0, link=None, verbose=0, dry_run=0])
 
    Copy file *src* to *dst*. If *dst* is a directory, then *src* is copied there
    with the same name; otherwise, it must be a filename. (If the file exists, it
    will be ruthlessly clobbered.) If *preserve_mode* is true (the default), the
-   file's mode (type and permission bits, or whatever is analogous on the current
-   platform) is copied. If *preserve_times* is true (the default), the last-
-   modified and last-access times are copied as well. If *update* is true, *src*
-   will only be copied if *dst* does not exist, or if *dst* does exist but is older
-   than *src*.
+   file's mode (type and permission bits, or whatever is analogous on the
+   current platform) is copied. If *preserve_times* is true (the default), the
+   last-modified and last-access times are copied as well. If *update* is true,
+   *src* will only be copied if *dst* does not exist, or if *dst* does exist but
+   is older than *src*.
 
    *link* allows you to make hard links (using :func:`os.link`) or symbolic links
    (using :func:`os.symlink`) instead of copying: set it to ``'hard'`` or
    .. % (not update) and (src newer than dst)).
 
 
-.. function:: move_file(src, dst[verbose, dry_run])
+.. function:: move_file(src, dst[, verbose, dry_run])
 
    Move file *src* to *dst*. If *dst* is a directory, the file will be moved into
    it with the same name; otherwise, *src* is just renamed to *dst*.  Returns the
 
    Examples of returned values:
 
-* ``linux-i586``
-
-* ``linux-alpha``
-
-* ``solaris-2.6-sun4u``
-
-* ``irix-5.3``
-
-* ``irix64-6.2``
+   * ``linux-i586``
+   * ``linux-alpha``
+   * ``solaris-2.6-sun4u``
+   * ``irix-5.3``
+   * ``irix64-6.2``
 
    For non-POSIX platforms, currently just returns ``sys.platform``.
 
    users can use in config files, command-line options, etc.  Currently this
    includes:
 
-* :envvar:`HOME` - user's home directory (Unix only)
-
-* :envvar:`PLAT` - description of the current platform, including hardware and
+   * :envvar:`HOME` - user's home directory (Unix only)
+   * :envvar:`PLAT` - description of the current platform, including hardware and
      OS (see :func:`get_platform`)
 
 
    underscore. No { } or ( ) style quoting is available.
 
 
-.. function:: grok_environment_error(exc[, prefix=``'error: '``])
+.. function:: grok_environment_error(exc[, prefix='error: '])
 
    Generate a useful error message from an :exc:`EnvironmentError`  (:exc:`IOError`
    or :exc:`OSError`) exception object.   Handles Python 1.5.1 and later styles,
    .. % Should probably be moved into the standard library.
 
 
-.. function:: execute(func, args[, msg=``None``, verbose=``0``, dry_run=``0``])
+.. function:: execute(func, args[, msg=None, verbose=0, dry_run=0])
 
    Perform some action that affects the outside world (for instance, writing to the
    filesystem).  Such actions are special because they are disabled by the
    :exc:`ValueError` if *val*  is anything else.
 
 
-.. function:: byte_compile(py_files[, optimize=``0``, force=``0``, prefix=``None``, base_dir=``None``, verbose=``1``, dry_run=``0``, direct=``None``])
+.. function:: byte_compile(py_files[, optimize=0, force=0, prefix=None, base_dir=None, verbose=1, dry_run=0, direct=None])
 
    Byte-compile a collection of Python source files to either :file:`.pyc` or
    :file:`.pyo` files in the same directory.  *py_files* is a list of files to
    compile; any files that don't end in :file:`.py` are silently skipped.
    *optimize* must be one of the following:
 
-* ``0`` - don't optimize (generate :file:`.pyc`)
-
-* ``1`` - normal optimization (like ``python -O``)
-
-* ``2`` - extra optimization (like ``python -OO``)
+   * ``0`` - don't optimize (generate :file:`.pyc`)
+   * ``1`` - normal optimization (like ``python -O``)
+   * ``2`` - extra optimization (like ``python -OO``)
 
    If *force* is true, all files are recompiled regardless of timestamps.
 
       later).
 
 
-.. class:: FancyGetopt([option_table=``None``])
+.. class:: FancyGetopt([option_table=None])
 
    The option_table is a list of 3-tuples: ``(long_option, short_option,
    help_string)``
 The :class:`FancyGetopt` class provides the following methods:
 
 
-.. method:: FancyGetopt.getopt([args=``None``, object=``None``])
+.. method:: FancyGetopt.getopt([args=None, object=None])
 
    Parse command-line options in args. Store as attributes on *object*.
 
    yet.
 
 
-.. method:: FancyGetopt.generate_help([header=``None``])
+.. method:: FancyGetopt.generate_help([header=None])
 
    Generate help text (a list of strings, one per suggested line of output) from
    the option table for this :class:`FancyGetopt` object.
 lines, and joining lines with backslashes.
 
 
-.. class:: TextFile([filename=``None``, file=``None``, **options])
+.. class:: TextFile([filename=None, file=None, **options])
 
    This class provides a file-like object that takes care of all  the things you
    commonly want to do when processing a text file  that has some line-by-line
       filename and the current line number).
 
 
-   .. method:: TextFile.warn(msg[,line=``None``])
+   .. method:: TextFile.warn(msg[,line=None])
 
       Print (to stderr) a warning message tied to the current logical line in the
       current file.  If the current logical line in the file spans multiple physical
 
 .. method:: Command.finalize_options()
 
-   Set final values for all the options that this command supports. This is always
-   called as late as possible, ie.  after any option assignments from the command-
-   line or from other commands have been done.  Thus, this is the place to to code
-   option dependencies: if *foo* depends on *bar*, then it is safe to set *foo*
-   from  *bar* as long as *foo* still has the same value it was assigned in
-   :meth:`initialize_options`.
+   Set final values for all the options that this command supports. This is
+   always called as late as possible, ie.  after any option assignments from the
+   command-line or from other commands have been done.  Thus, this is the place
+   to to code option dependencies: if *foo* depends on *bar*, then it is safe to
+   set *foo* from *bar* as long as *foo* still has the same value it was
+   assigned in :meth:`initialize_options`.
 
 
 .. method:: Command.run()

Doc-26/extending/building.rst

 :file:`demo.so` or :file:`demo.pyd`.
 
 In the :file:`setup.py`, all execution is performed by calling the ``setup``
-function. This takes a variable number of keyword  arguments, of which the
-example above uses only a subset. Specifically, the example specifies meta-
-information to build packages, and it specifies the contents of the package.
-Normally, a package will contain of addition modules, like Python source
-modules, documentation, subpackages, etc. Please refer to the distutils
-documentation in :ref:`distutils-index`
-to learn more about the features of distutils; this section explains building
-extension modules only.
+function. This takes a variable number of keyword arguments, of which the
+example above uses only a subset. Specifically, the example specifies
+meta-information to build packages, and it specifies the contents of the
+package.  Normally, a package will contain of addition modules, like Python
+source modules, documentation, subpackages, etc. Please refer to the distutils
+documentation in :ref:`distutils-index` to learn more about the features of
+distutils; this section explains building extension modules only.
 
 It is common to pre-compute arguments to :func:`setup`, to better structure the
 driver script. In the example above, the\ ``ext_modules`` argument to

Doc-26/extending/extending.rst

 
 Every failing :cfunc:`malloc` call must be turned into an exception --- the
 direct caller of :cfunc:`malloc` (or :cfunc:`realloc`) must call
-:cfunc:`PyErr_NoMemory` and return a failure indicator itself.  All the object-
-creating functions (for example, :cfunc:`PyInt_FromLong`) already do this, so
-this note is only relevant to those who call :cfunc:`malloc` directly.
+:cfunc:`PyErr_NoMemory` and return a failure indicator itself.  All the
+object-creating functions (for example, :cfunc:`PyInt_FromLong`) already do
+this, so this note is only relevant to those who call :cfunc:`malloc` directly.
 
 Also note that, with the important exception of :cfunc:`PyArg_ParseTuple` and
 friends, functions that return an integer status usually return a positive value
 
 When embedding Python, the :cfunc:`initspam` function is not called
 automatically unless there's an entry in the :cdata:`_PyImport_Inittab` table.
-The easiest way to handle this is to  statically initialize your statically-
-linked modules by directly calling :cfunc:`initspam` after the call to
-:cfunc:`Py_Initialize`::
+The easiest way to handle this is to statically initialize your
+statically-linked modules by directly calling :cfunc:`initspam` after the call
+to :cfunc:`Py_Initialize`::
 
    int
    main(int argc, char *argv[])
    Py_DECREF(arglist);
 
 :cfunc:`PyEval_CallObject` returns a Python object pointer: this is the return
-value of the Python function.  :cfunc:`PyEval_CallObject` is "reference-count-
-neutral" with respect to its arguments.  In the example a new tuple was created
-to serve as the argument list, which is :cfunc:`Py_DECREF`\ -ed immediately
-after the call.
+value of the Python function.  :cfunc:`PyEval_CallObject` is
+"reference-count-neutral" with respect to its arguments.  In the example a new
+tuple was created to serve as the argument list, which is :cfunc:`Py_DECREF`\
+-ed immediately after the call.
 
 The return value of :cfunc:`PyEval_CallObject` is "new": either it is a brand
 new object, or it is an existing object whose reference count has been

Doc-26/extending/newtypes.rst

    >>> l = [n]
    >>> n.first = l
 
-This is pretty silly, but it gives us an excuse to add support for the cyclic-
-garbage collector to the :class:`Noddy` example.  To support cyclic garbage
-collection, types need to fill two slots and set a class flag that enables these
-slots:
+This is pretty silly, but it gives us an excuse to add support for the
+cyclic-garbage collector to the :class:`Noddy` example.  To support cyclic
+garbage collection, types need to fill two slots and set a class flag that
+enables these slots:
 
 .. literalinclude:: ../includes/noddy4.c
 

Doc-26/howto/advocacy.rst

 being considered another one of Python's advantages. Most questions posted to
 the comp.lang.python newsgroup are quickly answered by someone.
 
-Should you need to dig into the source code, you'll find it's clear and well-
-organized, so it's not very difficult to write extensions and track down bugs
-yourself.  If you'd prefer to pay for support, there are companies and
+Should you need to dig into the source code, you'll find it's clear and
+well-organized, so it's not very difficult to write extensions and track down
+bugs yourself.  If you'd prefer to pay for support, there are companies and
 individuals who offer commercial support for Python.
 
 **Who uses Python for serious work?**

Doc-26/howto/curses.rst

 What is curses?
 ===============
 
-The curses library supplies a terminal-independent screen-painting and keyboard-
-handling facility for text-based terminals; such terminals include VT100s, the
-Linux console, and the simulated terminal provided by X11 programs such as xterm
-and rxvt.  Display terminals support various control codes to perform common
-operations such as moving the cursor, scrolling the screen, and erasing areas.
-Different terminals use widely differing codes, and often have their own minor
-quirks.
+The curses library supplies a terminal-independent screen-painting and
+keyboard-handling facility for text-based terminals; such terminals include
+VT100s, the Linux console, and the simulated terminal provided by X11 programs
+such as xterm and rxvt.  Display terminals support various control codes to
+perform common operations such as moving the cursor, scrolling the screen, and
+erasing areas.  Different terminals use widely differing codes, and often have
+their own minor quirks.
 
-In a world of X displays, one might ask "why bother"?  It's true that character-
-cell display terminals are an obsolete technology, but there are niches in which
-being able to do fancy things with them are still valuable.  One is on small-
-footprint or embedded Unixes that  don't carry an X server.  Another is for
-tools like OS installers and kernel configurators that may have to run before X
-is available.
+In a world of X displays, one might ask "why bother"?  It's true that
+character-cell display terminals are an obsolete technology, but there are
+niches in which being able to do fancy things with them are still valuable.  One
+is on small-footprint or embedded Unixes that don't carry an X server.  Another
+is for tools like OS installers and kernel configurators that may have to run
+before X is available.
 
 The curses library hides all the details of different terminals, and provides
-the programmer with an abstraction of a display, containing multiple non-
-overlapping windows.  The contents of a window can be changed in various ways--
-adding text, erasing it, changing its appearance--and the curses library will
-automagically figure out what control codes need to be sent to the terminal to
-produce the right output.
+the programmer with an abstraction of a display, containing multiple
+non-overlapping windows.  The contents of a window can be changed in various
+ways-- adding text, erasing it, changing its appearance--and the curses library
+will automagically figure out what control codes need to be sent to the terminal
+to produce the right output.
 
 The curses library was originally written for BSD Unix; the later System V
 versions of Unix from AT&T added many enhancements and new functions. BSD curses
-is no longer maintained, having been replaced by ncurses, which is an open-
-source implementation of the AT&T interface.  If you're using an open-source
-Unix such as Linux or FreeBSD, your system almost certainly uses ncurses.  Since
-most current commercial Unix versions are based on System V code, all the
-functions described here will probably be available.  The older versions of
-curses carried by some proprietary Unixes may not support everything, though.
+is no longer maintained, having been replaced by ncurses, which is an
+open-source implementation of the AT&T interface.  If you're using an
+open-source Unix such as Linux or FreeBSD, your system almost certainly uses
+ncurses.  Since most current commercial Unix versions are based on System V
+code, all the functions described here will probably be available.  The older
+versions of curses carried by some proprietary Unixes may not support
+everything, though.
 
 No one has made a Windows port of the curses module.  On a Windows platform, try
 the Console module written by Fredrik Lundh.  The Console module provides

Doc-26/howto/doanddont.rst

    print reduce(operator.add, nums)/len(nums)
 
 This cute little script prints the average of all numbers given on the command
-line. The :func:`reduce` adds up all the numbers, and the rest is just some pre-
-and postprocessing.
+line. The :func:`reduce` adds up all the numbers, and the rest is just some
+pre- and postprocessing.
 
 On the same note, note that :func:`float`, :func:`int` and :func:`long` all
 accept arguments of type string, and so are suited to parsing --- assuming you

Doc-26/howto/functional.rst

 
 
 Grouping elements
-'''''''''''''''''
+-----------------
 
 The last function I'll discuss, ``itertools.groupby(iter, key_func=None)``, is
 the most complicated.  ``key_func(elem)`` is a function that can compute a key

Doc-26/howto/regex.rst

 :file:`Tools/scripts/redemo.py`, a demonstration program included with the
 Python distribution.  It allows you to enter REs and strings, and displays
 whether the RE matches or fails. :file:`redemo.py` can be quite useful when
-trying to debug a complicated RE.  Phil Schwartz's `Kodos <http://www.phil-
-schwartz.com/kodos.spy>`_ is also an interactive tool for developing and testing
-RE patterns.
+trying to debug a complicated RE.  Phil Schwartz's `Kodos
+<http://www.phil-schwartz.com/kodos.spy>`_ is also an interactive tool for
+developing and testing RE patterns.
 
 This HOWTO uses the standard Python interpreter for its examples. First, run the
 Python interpreter, import the :mod:`re` module, and compile a RE::
    Matches only at the end of the string.
 
 ``\b``
-   Word boundary.   This is a zero-width assertion that matches only at the
+   Word boundary.  This is a zero-width assertion that matches only at the
    beginning or end of a word.  A word is defined as a sequence of alphanumeric
-   characters, so the end of a word is indicated by whitespace or a non-
-   alphanumeric character.
+   characters, so the end of a word is indicated by whitespace or a
+   non-alphanumeric character.
 
    The following example matches ``class`` only when it's a complete word; it won't
    match when it's contained inside another word. ::
 :func:`re.split` function, too.
 
 
-.. method:: .split(string [, maxsplit\ ``= 0``])
+.. method:: .split(string [, maxsplit=0])
    :noindex:
 
    Split *string* by the matches of the regular expression.  If capturing
 which can be either a string or a function, and the string to be processed.
 
 
-.. method:: .sub(replacement, string[, count\ ``= 0``])
+.. method:: .sub(replacement, string[, count=0])
    :noindex:
 
    Returns the string obtained by replacing the leftmost non-overlapping
    >>> print re.match('<.*?>', s).group()
    <html>
 
-(Note that parsing HTML or XML with regular expressions is painful. Quick-and-
-dirty patterns will handle common cases, but HTML and XML have special cases
-that will break the obvious regular expression; by the time you've written a
-regular expression that handles all of the possible cases, the patterns will be
-*very* complicated.  Use an HTML or XML parser module for such tasks.)
+(Note that parsing HTML or XML with regular expressions is painful.
+Quick-and-dirty patterns will handle common cases, but HTML and XML have special
+cases that will break the obvious regular expression; by the time you've written
+a regular expression that handles all of the possible cases, the patterns will
+be *very* complicated.  Use an HTML or XML parser module for such tasks.)
 
 
 Not Using re.VERBOSE
 Friedl's Mastering Regular Expressions, published by O'Reilly.  Unfortunately,
 it exclusively concentrates on Perl and Java's flavours of regular expressions,
 and doesn't contain any Python material at all, so it won't be useful as a
-reference for programming in Python.  (The first edition covered Python's now-
-removed :mod:`regex` module, which won't help you much.)  Consider checking it
-out from your library.
+reference for programming in Python.  (The first edition covered Python's
+now-removed :mod:`regex` module, which won't help you much.)  Consider checking
+it out from your library.
 
 
 .. rubric:: Footnotes

Doc-26/howto/sockets.rst

 better behavior and performance from a STREAM socket than anything else. I will
 try to clear up the mystery of what a socket is, as well as some hints on how to
 work with blocking and non-blocking sockets. But I'll start by talking about
-blocking sockets. You'll need to know how they work before dealing with non-
-blocking sockets.
+blocking sockets. You'll need to know how they work before dealing with
+non-blocking sockets.
 
 Part of the trouble with understanding these things is that "socket" can mean a
 number of subtly different things, depending on context. So first, let's make a
 empty) of the corresponding list you passed in. And if you put a socket in more
 than one input list, it will only be (at most) in one output list.
 
-If a socket is in the output readable list, you can be as-close-to-certain-as-
-we-ever-get-in-this-business that a ``recv`` on that socket will return
-*something*. Same idea for the writable list. You'll be able to send
-*something*. Maybe not all you want to, but *something* is better than nothing.
-(Actually, any reasonably healthy socket will return as writable - it just means
-outbound network buffer space is available.)
+If a socket is in the output readable list, you can be
+as-close-to-certain-as-we-ever-get-in-this-business that a ``recv`` on that
+socket will return *something*. Same idea for the writable list. You'll be able
+to send *something*. Maybe not all you want to, but *something* is better than
+nothing.  (Actually, any reasonably healthy socket will return as writable - it
+just means outbound network buffer space is available.)
 
 If you have a "server" socket, put it in the potential_readers list. If it comes
 out in the readable list, your ``accept`` will (almost certainly) work. If you

Doc-26/howto/urllib2.rst

 ====================
 
 To illustrate creating and installing a handler we will use the
-``HTTPBasicAuthHandler``. For a more detailed discussion of this subject -
+``HTTPBasicAuthHandler``. For a more detailed discussion of this subject --
 including an explanation of how Basic Authentication works - see the `Basic
 Authentication Tutorial
 <http://www.voidspace.org.uk/python/articles/authentication.shtml>`_.

Doc-26/install/index.rst

 can find out what your Python installation uses for :file:`{prefix}` and
 :file:`{exec-prefix}` by running Python in interactive mode and typing a few
 simple commands. Under Unix, just type ``python`` at the shell prompt.  Under
-Windows, choose :menuselection:`Start --> Programs --> Python |version|-->
+Windows, choose :menuselection:`Start --> Programs --> Python X.Y -->
 Python (command line)`.   Once the interpreter is started, you type Python code
 at the prompt.  For example, on my Linux system, I type the three Python
 statements shown below, and get the output as shown, to find out my
 
 If you want to define an entire installation scheme, you just have to supply all
 of the installation directory options.  The recommended way to do this is to
-supply relative paths; for example, if you want to maintain all Python module-
-related files under :file:`python` in your home directory, and you want a
+supply relative paths; for example, if you want to maintain all Python
+module-related files under :file:`python` in your home directory, and you want a
 separate directory for each platform that you use your home directory from, you
 might define the following installation scheme::
 
 There are two environment variables that can modify ``sys.path``.
 :envvar:`PYTHONHOME` sets an alternate value for the prefix of the Python
 installation.  For example, if :envvar:`PYTHONHOME` is set to ``/www/python``,
-the search path will be set to ``['', '/www/python/lib/python|version|/',
-'/www/python/lib/python|version|/plat-linux2', ...]``.
+the search path will be set to ``['', '/www/python/lib/pythonX.Y/',
+'/www/python/lib/pythonX.Y/plat-linux2', ...]``.
 
 The :envvar:`PYTHONPATH` variable can be set to a list of paths that will be
 added to the beginning of ``sys.path``.  For example, if :envvar:`PYTHONPATH` is
 Compiling a Python extension written in C or C++ will sometimes require
 specifying custom flags for the compiler and linker in order to use a particular
 library or produce a special kind of object code. This is especially true if the
-extension hasn't been tested on your  platform, or if you're trying to cross-
-compile Python.
+extension hasn't been tested on your platform, or if you're trying to
+cross-compile Python.
 
 In the most general case, the extension author might have foreseen that
 compiling the extensions would be complicated, and provided a :file:`Setup` file

Doc-26/library/_winreg.rst

    :const:`HKEY_LOCAL_MACHINE` tree. This may or may not be true.
 
 
-.. function:: OpenKey(key, sub_key[, res\ ``= 0``][, sam\ ``= KEY_READ``])
+.. function:: OpenKey(key, sub_key[, res=0][, sam=KEY_READ])
 
    Opens the specified key, returning a :dfn:`handle object`
 

Doc-26/library/asyncore.rst

 are probably what  you really need. Network servers are rarely processor bound,
 however.
 
-If your operating system supports the :cfunc:`select` system call  in its I/O
-library (and nearly all do), then you can use it to juggle  multiple
-communication channels at once; doing other work while your  I/O is taking place
-in the "background."  Although this strategy can  seem strange and complex,
-especially at first, it is in many ways  easier to understand and control than
-multi-threaded programming.   The :mod:`asyncore` module solves many of the
-difficult problems for  you, making the task of building sophisticated high-
-performance  network servers and clients a snap. For "conversational"
-applications and protocols the companion  :mod:`asynchat` module is invaluable.
+If your operating system supports the :cfunc:`select` system call in its I/O
+library (and nearly all do), then you can use it to juggle multiple
+communication channels at once; doing other work while your I/O is taking place
+in the "background."  Although this strategy can seem strange and complex,
+especially at first, it is in many ways easier to understand and control than
+multi-threaded programming.  The :mod:`asyncore` module solves many of the
+difficult problems for you, making the task of building sophisticated
+high-performance network servers and clients a snap. For "conversational"
+applications and protocols the companion :mod:`asynchat` module is invaluable.
 
 The basic idea behind both modules is to create one or more network *channels*,
 instances of class :class:`asyncore.dispatcher` and

Doc-26/library/binascii.rst

 binary and various ASCII-encoded binary representations. Normally, you will not
 use these functions directly but use wrapper modules like :mod:`uu`,
 :mod:`base64`, or :mod:`binhex` instead. The :mod:`binascii` module contains
-low-level functions written in C for greater speed that are used by the higher-
-level modules.
+low-level functions written in C for greater speed that are used by the
+higher-level modules.
 
 The :mod:`binascii` module defines the following functions:
 

Doc-26/library/bz2.rst

 
 .. method:: BZ2File.readline([size])
 
-   Return the next line from the file, as a string, retaining newline. A non-
-   negative *size* argument limits the maximum number of bytes to return (an
+   Return the next line from the file, as a string, retaining newline. A
+   non-negative *size* argument limits the maximum number of bytes to return (an
    incomplete line may be returned then). Return an empty string at EOF.
 
 

Doc-26/library/cgi.rst

 .. rubric:: Footnotes
 
 .. [#] Note that some recent versions of the HTML specification do state what order the
-   field values should be supplied in, but knowing whether a request was received
-   from a conforming browser, or even from a browser at all, is tedious and error-
-   prone.
+   field values should be supplied in, but knowing whether a request was
+   received from a conforming browser, or even from a browser at all, is tedious
+   and error-prone.
 

Doc-26/library/chunk.rst

 
 .. class:: Chunk(file[, align, bigendian, inclheader])
 
-   Class which represents a chunk.  The *file* argument is expected to be a file-
-   like object.  An instance of this class is specifically allowed.  The only
-   method that is needed is :meth:`read`.  If the methods :meth:`seek` and
-   :meth:`tell` are present and don't raise an exception, they are also used.  If
-   these methods are present and raise an exception, they are expected to not have
-   altered the object.  If the optional argument *align* is true, chunks are
-   assumed to be aligned on 2-byte boundaries.  If *align* is false, no alignment
-   is assumed.  The default value is true.  If the optional argument *bigendian* is
-   false, the chunk size is assumed to be in little-endian order.  This is needed
-   for WAVE audio files. The default value is true.  If the optional argument
-   *inclheader* is true, the size given in the chunk header includes the size of
-   the header.  The default value is false.
+   Class which represents a chunk.  The *file* argument is expected to be a
+   file-like object.  An instance of this class is specifically allowed.  The
+   only method that is needed is :meth:`read`.  If the methods :meth:`seek` and
+   :meth:`tell` are present and don't raise an exception, they are also used.
+   If these methods are present and raise an exception, they are expected to not
+   have altered the object.  If the optional argument *align* is true, chunks
+   are assumed to be aligned on 2-byte boundaries.  If *align* is false, no
+   alignment is assumed.  The default value is true.  If the optional argument
+   *bigendian* is false, the chunk size is assumed to be in little-endian order.
+   This is needed for WAVE audio files. The default value is true.  If the
+   optional argument *inclheader* is true, the size given in the chunk header
+   includes the size of the header.  The default value is false.
 
 A :class:`Chunk` object supports the following methods:
 

Doc-26/library/cmath.rst

 
 
 This module is always available.  It provides access to mathematical functions
-for complex numbers.  The functions in this module accept integers, floating-
-point numbers or complex numbers as arguments. They will also accept any Python
-object that has either a :meth:`__complex__` or a :meth:`__float__` method:
-these methods are used to convert the object to a complex or floating-point
-number, respectively, and the function is then applied to the result of the
-conversion.
+for complex numbers.  The functions in this module accept integers,
+floating-point numbers or complex numbers as arguments. They will also accept
+any Python object that has either a :meth:`__complex__` or a :meth:`__float__`
+method: these methods are used to convert the object to a complex or
+floating-point number, respectively, and the function is then applied to the
+result of the conversion.
 
 The functions are:
 

Doc-26/library/code.rst

    :func:`compile_command`; the default for *filename* is ``'<input>'``, and for
    *symbol* is ``'single'``.  One several things can happen:
 
-* The input is incorrect; :func:`compile_command` raised an exception
+   * The input is incorrect; :func:`compile_command` raised an exception
      (:exc:`SyntaxError` or :exc:`OverflowError`).  A syntax traceback will be
      printed by calling the :meth:`showsyntaxerror` method.  :meth:`runsource`
      returns ``False``.
 
-* The input is incomplete, and more input is required; :func:`compile_command`
+   * The input is incomplete, and more input is required; :func:`compile_command`
      returned ``None``. :meth:`runsource` returns ``True``.
 
-* The input is complete; :func:`compile_command` returned a code object.  The
+   * The input is complete; :func:`compile_command` returned a code object.  The
      code is executed by calling the :meth:`runcode` (which also handles run-time
      exceptions, except for :exc:`SystemExit`). :meth:`runsource` returns ``False``.
 

Doc-26/library/codecs.rst

    argument, the encoding name in all lower case letters, and return a
    :class:`CodecInfo` object having the following attributes:
 
-* ``name`` The name of the encoding;
+   * ``name`` The name of the encoding;
 
-* ``encoder`` The stateless encoding function;
+   * ``encoder`` The stateless encoding function;
 
-* ``decoder`` The stateless decoding function;
+   * ``decoder`` The stateless decoding function;
 
-* ``incrementalencoder`` An incremental encoder class or factory function;
+   * ``incrementalencoder`` An incremental encoder class or factory function;
 
-* ``incrementaldecoder`` An incremental decoder class or factory function;
+   * ``incrementaldecoder`` An incremental decoder class or factory function;
 
-* ``streamwriter`` A stream writer class or factory function;
+   * ``streamwriter`` A stream writer class or factory function;
 
-* ``streamreader`` A stream reader class or factory function.
+   * ``streamreader`` A stream reader class or factory function.
 
    The various functions or classes take the following arguments:
 
    The :class:`IncrementalEncoder` may implement different error handling schemes
    by providing the *errors* keyword argument. These parameters are predefined:
 
-* ``'strict'`` Raise :exc:`ValueError` (or a subclass); this is the default.
+   * ``'strict'`` Raise :exc:`ValueError` (or a subclass); this is the default.
 
-* ``'ignore'`` Ignore the character and continue with the next.
+   * ``'ignore'`` Ignore the character and continue with the next.
 
-* ``'replace'`` Replace with a suitable replacement character
+   * ``'replace'`` Replace with a suitable replacement character
 
-* ``'xmlcharrefreplace'`` Replace with the appropriate XML character reference
+   * ``'xmlcharrefreplace'`` Replace with the appropriate XML character reference
 
-* ``'backslashreplace'`` Replace with backslashed escape sequences.
+   * ``'backslashreplace'`` Replace with backslashed escape sequences.
 
    The *errors* argument will be assigned to an attribute of the same name.
    Assigning to this attribute makes it possible to switch between different error
    The :class:`IncrementalDecoder` may implement different error handling schemes
    by providing the *errors* keyword argument. These parameters are predefined:
 
-* ``'strict'`` Raise :exc:`ValueError` (or a subclass); this is the default.
+   * ``'strict'`` Raise :exc:`ValueError` (or a subclass); this is the default.
 
-* ``'ignore'`` Ignore the character and continue with the next.
+   * ``'ignore'`` Ignore the character and continue with the next.
 
-* ``'replace'`` Replace with a suitable replacement character.
+   * ``'replace'`` Replace with a suitable replacement character.
 
    The *errors* argument will be assigned to an attribute of the same name.
    Assigning to this attribute makes it possible to switch between different error
    The :class:`StreamWriter` may implement different error handling schemes by
    providing the *errors* keyword argument. These parameters are predefined:
 
-* ``'strict'`` Raise :exc:`ValueError` (or a subclass); this is the default.
+   * ``'strict'`` Raise :exc:`ValueError` (or a subclass); this is the default.
 
-* ``'ignore'`` Ignore the character and continue with the next.
+   * ``'ignore'`` Ignore the character and continue with the next.
 
-* ``'replace'`` Replace with a suitable replacement character
+   * ``'replace'`` Replace with a suitable replacement character
 
-* ``'xmlcharrefreplace'`` Replace with the appropriate XML character reference
+   * ``'xmlcharrefreplace'`` Replace with the appropriate XML character reference
 
-* ``'backslashreplace'`` Replace with backslashed escape sequences.
+   * ``'backslashreplace'`` Replace with backslashed escape sequences.
 
    The *errors* argument will be assigned to an attribute of the same name.
    Assigning to this attribute makes it possible to switch between different error
    The :class:`StreamReader` may implement different error handling schemes by
    providing the *errors* keyword argument. These parameters are defined:
 
-* ``'strict'`` Raise :exc:`ValueError` (or a subclass); this is the default.
+   * ``'strict'`` Raise :exc:`ValueError` (or a subclass); this is the default.
 
-* ``'ignore'`` Ignore the character and continue with the next.
+   * ``'ignore'`` Ignore the character and continue with the next.
 
-* ``'replace'`` Replace with a suitable replacement character.
+   * ``'replace'`` Replace with a suitable replacement character.
 
    The *errors* argument will be assigned to an attribute of the same name.
    Assigning to this attribute makes it possible to switch between different error

Doc-26/library/codeop.rst

 
 .. % LaTeXed from excellent doc-string.
 
-The :mod:`codeop` module provides utilities upon which the Python read-eval-
-print loop can be emulated, as is done in the :mod:`code` module.  As a result,
-you probably don't want to use the module directly; if you want to include such
-a loop in your program you probably want to use the :mod:`code` module instead.
+The :mod:`codeop` module provides utilities upon which the Python
+read-eval-print loop can be emulated, as is done in the :mod:`code` module.  As
+a result, you probably don't want to use the module directly; if you want to
+include such a loop in your program you probably want to use the :mod:`code`
+module instead.
 
 There are two parts to this job:
 

Doc-26/library/cookie.rst

    Morsels are dictionary-like objects, whose set of keys is constant --- the valid
    :rfc:`2109` attributes, which are
 
-* ``expires``
-
-* ``path``
-
-* ``comment``
-
-* ``domain``
-
-* ``max-age``
-
-* ``secure``
-
-* ``version``
+   * ``expires``
+   * ``path``
+   * ``comment``
+   * ``domain``
+   * ``max-age``
+   * ``secure``
+   * ``version``
 
    The keys are case-insensitive.
 

Doc-26/library/cookielib.rst

    received in a :mailheader:`Set-Cookie` header with a version cookie-attribute of
    1) are treated according to the RFC 2965 rules.  However, if RFC 2965 handling
    is turned off or :attr:`rfc2109_as_netscape` is True, RFC 2109 cookies are
-   'downgraded' by the :class:`CookieJar` instance to Netscape cookies, by setting
-   the :attr:`version` attribute of the :class:`Cookie` instance to 0.
-   :class:`DefaultCookiePolicy` also provides some parameters to allow some fine-
-   tuning of policy.
+   'downgraded' by the :class:`CookieJar` instance to Netscape cookies, by
+   setting the :attr:`version` attribute of the :class:`Cookie` instance to 0.
+   :class:`DefaultCookiePolicy` also provides some parameters to allow some
+   fine-tuning of policy.
 
 
 .. class:: Cookie()
 
    .. note::
 
-      This loses information about RFC 2965 cookies, and also about newer or non-
-      standard cookie-attributes such as ``port``.
+      This loses information about RFC 2965 cookies, and also about newer or
+      non-standard cookie-attributes such as ``port``.
 
    .. warning::
 
 :class:`Cookie` instances have Python attributes roughly corresponding to the
 standard cookie-attributes specified in the various cookie standards.  The
 correspondence is not one-to-one, because there are complicated rules for
-assigning default values, because the ``max-age`` and ``expires`` cookie-
-attributes contain equivalent information, and because RFC 2109 cookies may be
-'downgraded' by :mod:`cookielib` from version 1 to version 0 (Netscape) cookies.
+assigning default values, because the ``max-age`` and ``expires``
+cookie-attributes contain equivalent information, and because RFC 2109 cookies
+may be 'downgraded' by :mod:`cookielib` from version 1 to version 0 (Netscape)
+cookies.
 
 Assignment to these attributes should not be necessary other than in rare
 circumstances in a :class:`CookiePolicy` method.  The class does not enforce
 
 .. attribute:: Cookie.rfc2109
 
-   True if this cookie was received as an RFC 2109 cookie (ie. the cookie arrived
-   in a :mailheader:`Set-Cookie` header, and the value of the Version cookie-
-   attribute in that header was 1).  This attribute is provided because
-   :mod:`cookielib` may 'downgrade' RFC 2109 cookies to Netscape cookies, in which
-   case :attr:`version` is 0.
+   True if this cookie was received as an RFC 2109 cookie (ie. the cookie
+   arrived in a :mailheader:`Set-Cookie` header, and the value of the Version
+   cookie-attribute in that header was 1).  This attribute is provided because
+   :mod:`cookielib` may 'downgrade' RFC 2109 cookies to Netscape cookies, in
+   which case :attr:`version` is 0.
 
    .. versionadded:: 2.5
 

Doc-26/library/csv.rst

 The :mod:`csv` module defines the following functions:
 
 
-.. function:: reader(csvfile[, dialect=``'excel'``][, fmtparam])
+.. function:: reader(csvfile[, dialect='excel'][, fmtparam])
 
    Return a reader object which will iterate over lines in the given *csvfile*.
    *csvfile* can be any object which supports the iterator protocol and returns a
       be split into lines in a manner which preserves the newline characters.
 
 
-.. function:: writer(csvfile[, dialect=``'excel'``][, fmtparam])
+.. function:: writer(csvfile[, dialect='excel'][, fmtparam])
 
    Return a writer object responsible for converting the user's data into delimited
    strings on the given file-like object.  *csvfile* can be any object with a
 The :mod:`csv` module defines the following classes:
 
 
-.. class:: DictReader(csvfile[, fieldnames=:const:`None`,[, restkey=:const:`None`[, restval=:const:`None`[, dialect=``'excel'``[, *args, **kwds]]]]])
+.. class:: DictReader(csvfile[, fieldnames=:const:None,[, restkey=:const:None[, restval=None[, dialect='excel'[, *args, **kwds]]]]])
 
    Create an object which operates like a regular reader but maps the information
    read into a dict whose keys are given by the optional  *fieldnames* parameter.
    arguments are passed to the underlying :class:`reader` instance.
 
 
-.. class:: DictWriter(csvfile, fieldnames[, restval=""[, extrasaction=``'raise'``[, dialect=``'excel'``[, *args, **kwds]]]])
+.. class:: DictWriter(csvfile, fieldnames[, restval=''[, extrasaction='raise'[, dialect='excel'[, *args, **kwds]]]])
 
    Create an object which operates like a regular writer but maps dictionaries onto
    output rows.  The *fieldnames* parameter identifies the order in which values in
 The :class:`Sniffer` class provides two methods:
 
 
-.. method:: Sniffer.sniff(sample[,delimiters=None])
+.. method:: Sniffer.sniff(sample[, delimiters=None])
 
    Analyze the given *sample* and return a :class:`Dialect` subclass reflecting the
    parameters found.  If the optional *delimiters* parameter is given, it is

Doc-26/library/ctypes.rst

 
 .. function:: string_at(address[, size])
 
-   This function returns the string starting at memory address address. If size is
-   specified, it is used as size, otherwise the string is assumed to be zero-
-   terminated.
+   This function returns the string starting at memory address address. If size
+   is specified, it is used as size, otherwise the string is assumed to be
+   zero-terminated.
 
 
 .. function:: WinError(code=None, descr=None)
 
    This function returns the wide character string starting at memory address
    ``address`` as unicode string. If ``size`` is specified, it is used as the
-   number of characters of the string, otherwise the string is assumed to be zero-
-   terminated.
+   number of characters of the string, otherwise the string is assumed to be
+   zero-terminated.
 
 
 .. _ctypes-data-types:
 
 .. class:: c_wchar_p
 
-   Represents the C ``wchar_t *`` datatype, which must be a pointer to a zero-
-   terminated wide character string. The constructor accepts an integer address, or
-   a string.
+   Represents the C ``wchar_t *`` datatype, which must be a pointer to a
+   zero-terminated wide character string. The constructor accepts an integer
+   address, or a string.
 
 
 .. class:: c_bool

Doc-26/library/curses.rst

 .. versionchanged:: 1.6
    Added support for the ``ncurses`` library and converted to a package.
 
-The :mod:`curses` module provides an interface to the curses library, the de-
-facto standard for portable advanced terminal handling.
+The :mod:`curses` module provides an interface to the curses library, the
+de-facto standard for portable advanced terminal handling.
 
 While curses is most widely used in the Unix environment, versions are available
 for DOS, OS/2, and possibly other systems as well.  This extension module is
    attributes *attr*.  The change is then applied to every character position in
    that window:
 
-* The attribute of every character in the window  is changed to the new
+   * The attribute of every character in the window  is changed to the new
      background attribute.
 
-* Wherever  the  former background character appears, it is changed to the new
+   * Wherever  the  former background character appears, it is changed to the new
      background character.
 
 
    *sminrow*, or *smincol* are treated as if they were zero.
 
 
-.. method:: window.scroll([lines\ ``= 1``])
+.. method:: window.scroll([lines=1])
 
    Scroll the screen or scrolling region upward by *lines* lines.
 
 The :mod:`curses.textpad` module provides a :class:`Textbox` class that handles
 elementary text editing in a curses window, supporting a set of keybindings
 resembling those of Emacs (thus, also of Netscape Navigator, BBedit 6.x,
-FrameMaker, and many other programs).  The module also provides a rectangle-
-drawing function useful for framing text boxes or for other purposes.
+FrameMaker, and many other programs).  The module also provides a
+rectangle-drawing function useful for framing text boxes or for other purposes.
 
 The module :mod:`curses.textpad` defines the following function:
 

Doc-26/library/datetime.rst

    Only *days*, *seconds* and *microseconds* are stored internally.  Arguments are
    converted to those units:
 
-* A millisecond is converted to 1000 microseconds.
-
-* A minute is converted to 60 seconds.
-
-* An hour is converted to 3600 seconds.
-
-* A week is converted to 7 days.
+   * A millisecond is converted to 1000 microseconds.
+   * A minute is converted to 60 seconds.
+   * An hour is converted to 3600 seconds.
+   * A week is converted to 7 days.
 
    and days, seconds and microseconds are then normalized so that the
    representation is unique, with
 
-* ``0 <= microseconds < 1000000``
-
-* ``0 <= seconds < 3600*24`` (the number of seconds in one day)
-
-* ``-999999999 <= days <= 999999999``
+   * ``0 <= microseconds < 1000000``
+   * ``0 <= seconds < 3600*24`` (the number of seconds in one day)
+   * ``-999999999 <= days <= 999999999``
 
    If any argument is a float and there are fractional microseconds, the fractional
    microseconds left over from all arguments are combined and their sum is rounded
    All arguments are required.  Arguments may be ints or longs, in the following
    ranges:
 
-* ``MINYEAR <= year <= MAXYEAR``
-
-* ``1 <= month <= 12``
-
-* ``1 <= day <= number of days in the given month and year``
+   * ``MINYEAR <= year <= MAXYEAR``
+   * ``1 <= month <= 12``
+   * ``1 <= day <= number of days in the given month and year``
 
    If an argument outside those ranges is given, :exc:`ValueError` is raised.
 
    instance of a :class:`tzinfo` subclass.  The remaining arguments may be ints or
    longs, in the following ranges:
 
-* ``MINYEAR <= year <= MAXYEAR``
-
-* ``1 <= month <= 12``
-
-* ``1 <= day <= number of days in the given month and year``
-
-* ``0 <= hour < 24``
-
-* ``0 <= minute < 60``
-
-* ``0 <= second < 60``
-
-* ``0 <= microsecond < 1000000``
+   * ``MINYEAR <= year <= MAXYEAR``
+   * ``1 <= month <= 12``
+   * ``1 <= day <= number of days in the given month and year``
+   * ``0 <= hour < 24``
+   * ``0 <= minute < 60``
+   * ``0 <= second < 60``
+   * ``0 <= microsecond < 1000000``
 
    If an argument outside those ranges is given, :exc:`ValueError` is raised.
 
 
 .. method:: datetime.isoformat([sep])
 
-   Return a string representing the date and time in ISO 8601 format, YYYY-MM-
-   DDTHH:MM:SS.mmmmmm or, if :attr:`microsecond` is 0, YYYY-MM-DDTHH:MM:SS
+   Return a string representing the date and time in ISO 8601 format,
+   YYYY-MM-DDTHH:MM:SS.mmmmmm or, if :attr:`microsecond` is 0,
+   YYYY-MM-DDTHH:MM:SS
 
-   If :meth:`utcoffset` does not return ``None``, a 6-character string is appended,
-   giving the UTC offset in (signed) hours and minutes: YYYY-MM-
-   DDTHH:MM:SS.mmmmmm+HH:MM or, if :attr:`microsecond` is 0 YYYY-MM-
-   DDTHH:MM:SS+HH:MM
+   If :meth:`utcoffset` does not return ``None``, a 6-character string is
+   appended, giving the UTC offset in (signed) hours and minutes:
+   YYYY-MM-DDTHH:MM:SS.mmmmmm+HH:MM or, if :attr:`microsecond` is 0
+   YYYY-MM-DDTHH:MM:SS+HH:MM
 
    The optional argument *sep* (default ``'T'``) is a one-character separator,
    placed between the date and time portions of the result.  For example, ::
    :class:`tzinfo` subclass.  The remaining arguments may be ints or longs, in the
    following ranges:
 
-* ``0 <= hour < 24``
-
-* ``0 <= minute < 60``
-
-* ``0 <= second < 60``
-
-* ``0 <= microsecond < 1000000``.
+   * ``0 <= hour < 24``
+   * ``0 <= minute < 60``
+   * ``0 <= second < 60``
+   * ``0 <= microsecond < 1000000``.
 
    If an argument outside those ranges is given, :exc:`ValueError` is raised.  All
    default to ``0`` except *tzinfo*, which defaults to :const:`None`.

Doc-26/library/decimal.rst

 
    The *rounding* option is one of:
 
-* :const:`ROUND_CEILING` (towards :const:`Infinity`),
-
-* :const:`ROUND_DOWN` (towards zero),
-
-* :const:`ROUND_FLOOR` (towards :const:`-Infinity`),
-
-* :const:`ROUND_HALF_DOWN` (to nearest with ties going towards zero),
-
-* :const:`ROUND_HALF_EVEN` (to nearest with ties going to nearest even integer),
-
-* :const:`ROUND_HALF_UP` (to nearest with ties going away from zero), or
-
-* :const:`ROUND_UP` (away from zero).
+   * :const:`ROUND_CEILING` (towards :const:`Infinity`),
+   * :const:`ROUND_DOWN` (towards zero),
+   * :const:`ROUND_FLOOR` (towards :const:`-Infinity`),
+   * :const:`ROUND_HALF_DOWN` (to nearest with ties going towards zero),
+   * :const:`ROUND_HALF_EVEN` (to nearest with ties going to nearest even integer),
+   * :const:`ROUND_HALF_UP` (to nearest with ties going away from zero), or
+   * :const:`ROUND_UP` (away from zero).
 
    The *traps* and *flags* fields list any signals to be set. Generally, new
    contexts should only set traps and leave the flags clear.