]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
#14804: Remove [] around optional arguments with default values
authorHynek Schlawack <hs@ox.cx>
Tue, 22 May 2012 08:27:40 +0000 (10:27 +0200)
committerHynek Schlawack <hs@ox.cx>
Tue, 22 May 2012 08:27:40 +0000 (10:27 +0200)
Mostly just mechanical removal of []. In some rare cases I've pulled the
default value up into the argument list.

25 files changed:
Doc/library/bdb.rst
Doc/library/csv.rst
Doc/library/difflib.rst
Doc/library/dl.rst
Doc/library/formatter.rst
Doc/library/functions.rst
Doc/library/httplib.rst
Doc/library/itertools.rst
Doc/library/mailbox.rst
Doc/library/os.rst
Doc/library/ossaudiodev.rst
Doc/library/parser.rst
Doc/library/pickletools.rst
Doc/library/plistlib.rst
Doc/library/profile.rst
Doc/library/pyclbr.rst
Doc/library/shelve.rst
Doc/library/shutil.rst
Doc/library/struct.rst
Doc/library/timeit.rst
Doc/library/trace.rst
Doc/library/ttk.rst
Doc/library/webbrowser.rst
Doc/library/wsgiref.rst
Doc/library/xml.dom.minidom.rst

index bd2b16f782c54cc4d787f6c56bfbf9cc77cb1248..1cbb8f6d5d7c5b98e50b4abb6d00e6b09c91788b 100644 (file)
@@ -20,7 +20,7 @@ The following exception is defined:
 
 The :mod:`bdb` module also defines two classes:
 
-.. class:: Breakpoint(self, file, line[, temporary=0[, cond=None [, funcname=None]]])
+.. class:: Breakpoint(self, file, line, temporary=0, cond=None , funcname=None)
 
    This class implements temporary breakpoints, ignore counts, disabling and
    (re-)enabling, and conditionals.
@@ -245,7 +245,7 @@ The :mod:`bdb` module also defines two classes:
    breakpoints.  These methods return a string containing an error message if
    something went wrong, or ``None`` if all is well.
 
-   .. method:: set_break(filename, lineno[, temporary=0[, cond[, funcname]]])
+   .. method:: set_break(filename, lineno, temporary=0, cond=None, funcname=None)
 
       Set a new breakpoint.  If the *lineno* line doesn't exist for the
       *filename* passed as argument, return an error message.  The *filename*
index f4e9d7cb940fff4d9ad86ba81bd3b79074a288c0..33b39f2837226616ebf29e75bf68ace81e164b82 100644 (file)
@@ -162,7 +162,7 @@ The :mod:`csv` module defines the following functions:
 The :mod:`csv` module defines the following classes:
 
 
-.. class:: DictReader(csvfile[, fieldnames=None[, restkey=None[, restval=None[, dialect='excel'[, *args, **kwds]]]]])
+.. class:: DictReader(csvfile, fieldnames=None, restkey=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.
@@ -175,7 +175,7 @@ The :mod:`csv` module defines the following classes:
    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
@@ -219,7 +219,7 @@ The :mod:`csv` module defines the following classes:
 
    The :class:`Sniffer` class provides two methods:
 
-   .. method:: sniff(sample[, delimiters=None])
+   .. method:: sniff(sample, delimiters=None)
 
       Analyze the given *sample* and return a :class:`Dialect` subclass
       reflecting the parameters found.  If the optional *delimiters* parameter
index 225b486d6f2ad6f370ffbf5a6a918eeb62151782..f3b23e012c2a8f666070d958344f628061e91857 100644 (file)
@@ -84,7 +84,7 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
    The constructor for this class is:
 
 
-   .. function:: __init__([tabsize][, wrapcolumn][, linejunk][, charjunk])
+   .. function:: __init__(tabsize=8, wrapcolumn=None, linejunk=None, charjunk=IS_CHARACTER_JUNK)
 
       Initializes instance of :class:`HtmlDiff`.
 
@@ -344,7 +344,7 @@ SequenceMatcher Objects
 The :class:`SequenceMatcher` class has this constructor:
 
 
-.. class:: SequenceMatcher([isjunk[, a[, b[, autojunk=True]]]])
+.. class:: SequenceMatcher(isjunk=None, a='', b='', autojunk=True)
 
    Optional argument *isjunk* must be ``None`` (the default) or a one-argument
    function that takes a sequence element and returns true if and only if the
index 40556cc80990498c03d1a9eed85aa00ee81129cc..92de1dca04e7436e4f74820d0ce3f7b1923e8395 100644 (file)
@@ -31,7 +31,7 @@ libraries. It allows the program to call arbitrary functions in such a library.
 The :mod:`dl` module defines the following function:
 
 
-.. function:: open(name[, mode=RTLD_LAZY])
+.. function:: open(name, mode=RTLD_LAZY)
 
    Open a shared object file, and return a handle. Mode signifies late binding
    (:const:`RTLD_LAZY`) or immediate binding (:const:`RTLD_NOW`). Default is
index ba09b8e838a8c9045e047fc325712dc11a6e749e..e696fec3e4b9821a0f20efca6ec3261729d7a489 100644 (file)
@@ -341,10 +341,10 @@ 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
+   or, if *file* is None, on standard output.  The output is simply word-wrapped
    to the number of columns specified by *maxcol*.  This class is suitable for
    reflowing a sequence of paragraphs.
 
index f37555809b7f67e97cc4033ec82088e43306af6c..54baecf3948afd61ffd83dcebce0553d0566d210 100644 (file)
@@ -354,7 +354,7 @@ available.  They are listed here in alphabetical order.
       Using :func:`divmod` with complex numbers is deprecated.
 
 
-.. function:: enumerate(sequence[, start=0])
+.. function:: enumerate(sequence, start=0)
 
    Return an enumerate object. *sequence* must be a sequence, an
    :term:`iterator`, or some other object which supports iteration.  The
@@ -912,7 +912,7 @@ available.  They are listed here in alphabetical order.
    accidents.)
 
 
-.. function:: print([object, ...][, sep=' '][, end='\\n'][, file=sys.stdout])
+.. function:: print([object, ...], sep=' ', end='\\n', file=sys.stdout)
 
    Print *object*\(s) to the stream *file*, separated by *sep* and followed by
    *end*.  *sep*, *end* and *file*, if present, must be given as keyword
index 0a6968f102b8f487223fc9c0dfea901107cea294..1e37cdff78b75d8f1590996f9d27419c8abaae5a 100644 (file)
@@ -89,7 +89,7 @@ The module provides the following classes:
       *source_address* was added.
 
 
-.. class:: HTTPResponse(sock[, debuglevel=0][, strict=0])
+.. class:: HTTPResponse(sock, debuglevel=0, strict=0)
 
    Class whose instances are returned upon successful connection.  Not instantiated
    directly by user.
index a553d09964e345215f43048192fab1e646b33425..477ea86fba76c2b44d5d3022920fe38c8ea4d114 100644 (file)
@@ -627,7 +627,7 @@ loops that truncate the stream.
                   break
 
 
-.. function:: tee(iterable[, n=2])
+.. function:: tee(iterable, n=2)
 
    Return *n* independent iterators from a single iterable.  Equivalent to::
 
index 5cdb683c34e7384666f0476e93283693c1e8f180..54ade5a7dc46acdcc98df2a401cb9c6b2a779d31 100644 (file)
@@ -154,7 +154,7 @@ Maildir, mbox, MH, Babyl, and MMDF.
       when the :class:`Mailbox` instance was initialized.
 
 
-   .. method:: get(key[, default=None])
+   .. method:: get(key, default=None)
                __getitem__(key)
 
       Return a representation of the message corresponding to *key*. If no such
@@ -278,7 +278,7 @@ Maildir, mbox, MH, Babyl, and MMDF.
 ^^^^^^^^^^^^^^^^
 
 
-.. class:: Maildir(dirname[, factory=rfc822.Message[, create=True]])
+.. class:: Maildir(dirname, factory=rfc822.Message, create=True)
 
    A subclass of :class:`Mailbox` for mailboxes in Maildir format. Parameter
    *factory* is a callable object that accepts a file-like message representation
@@ -423,7 +423,7 @@ Maildir, mbox, MH, Babyl, and MMDF.
 ^^^^^^^^^^^^^
 
 
-.. class:: mbox(path[, factory=None[, create=True]])
+.. class:: mbox(path, factory=None, create=True)
 
    A subclass of :class:`Mailbox` for mailboxes in mbox format. Parameter *factory*
    is a callable object that accepts a file-like message representation (which
@@ -483,7 +483,7 @@ Maildir, mbox, MH, Babyl, and MMDF.
 ^^^^^^^^^^^
 
 
-.. class:: MH(path[, factory=None[, create=True]])
+.. class:: MH(path, factory=None, create=True)
 
    A subclass of :class:`Mailbox` for mailboxes in MH format. Parameter *factory*
    is a callable object that accepts a file-like message representation (which
@@ -613,7 +613,7 @@ Maildir, mbox, MH, Babyl, and MMDF.
 ^^^^^^^^^^^^^^
 
 
-.. class:: Babyl(path[, factory=None[, create=True]])
+.. class:: Babyl(path, factory=None, create=True)
 
    A subclass of :class:`Mailbox` for mailboxes in Babyl format. Parameter
    *factory* is a callable object that accepts a file-like message representation
@@ -689,7 +689,7 @@ Maildir, mbox, MH, Babyl, and MMDF.
 ^^^^^^^^^^^^^
 
 
-.. class:: MMDF(path[, factory=None[, create=True]])
+.. class:: MMDF(path, factory=None, create=True)
 
    A subclass of :class:`Mailbox` for mailboxes in MMDF format. Parameter *factory*
    is a callable object that accepts a file-like message representation (which
@@ -987,7 +987,7 @@ When a :class:`MaildirMessage` instance is created based upon a
       are excluded.
 
 
-   .. method:: set_from(from_[, time_=None])
+   .. method:: set_from(from_, time_=None)
 
       Set the "From " line to *from_*, which should be specified without a
       leading "From " or trailing newline. For convenience, *time_* may be
@@ -1358,7 +1358,7 @@ When a :class:`BabylMessage` instance is created based upon an
       are excluded.
 
 
-   .. method:: set_from(from_[, time_=None])
+   .. method:: set_from(from_, time_=None)
 
       Set the "From " line to *from_*, which should be specified without a
       leading "From " or trailing newline. For convenience, *time_* may be
index 7102c768ae3b8e20316d55b33bb5fe5d9a1e9ff5..8569f82b440a1485b85b6ead53ecda92e2947ce6 100644 (file)
@@ -1181,7 +1181,7 @@ Files and Directories
    doesn't open the FIFO --- it just creates the rendezvous point.
 
 
-.. function:: mknod(filename[, mode=0600, device])
+.. function:: mknod(filename, mode=0600, device=0)
 
    Create a filesystem node (file, device special file or named pipe) named
    *filename*. *mode* specifies both the permissions to use and the type of node to
@@ -1583,7 +1583,7 @@ Files and Directories
    Availability: Unix, Windows.
 
 
-.. function:: walk(top[, topdown=True [, onerror=None[, followlinks=False]]])
+.. function:: walk(top, topdown=True, onerror=None, followlinks=False)
 
    .. index::
       single: directory; walking
index 00c113b6f273eecdce43f9be3269bafce17371d4..515c701900d4e76237adc59aa20a62ff04a0ad4d 100644 (file)
@@ -275,7 +275,7 @@ The following convenience methods combine several ioctls, or one ioctl and some
 simple calculations.
 
 
-.. method:: oss_audio_device.setparameters(format, nchannels, samplerate [, strict=False])
+.. method:: oss_audio_device.setparameters(format, nchannels, samplerate, strict=False)
 
    Set the key audio sampling parameters---sample format, number of channels, and
    sampling rate---in one method call.  *format*,  *nchannels*, and *samplerate*
index 554229f38acb52121ef71a9b77edf0cfb424bd1c..e2d4523909e77a65fbf2037c43cbfd9a00e02307 100644 (file)
@@ -200,7 +200,7 @@ numbering information.
    information is omitted if the flag is false or omitted.
 
 
-.. function:: compilest(ast[, filename='<syntax-tree>'])
+.. function:: compilest(ast, filename='<syntax-tree>')
 
    .. index:: builtin: eval
 
index ce47c978dbb23bc243b476eaba5f23b2044d91f9..ebb30abd4313130cd618f7b0de3f347ca7c29166 100644 (file)
@@ -20,7 +20,7 @@ useful for Python core developers who are working on the :mod:`pickle` and
 probably won't find the :mod:`pickletools` module relevant.
 
 
-.. function:: dis(pickle[, out=None, memo=None, indentlevel=4])
+.. function:: dis(pickle, out=None, memo=None, indentlevel=4)
 
    Outputs a symbolic disassembly of the pickle to the file-like object *out*,
    defaulting to ``sys.stdout``.  *pickle* can be a string or a file-like object.
index 11268c2babab6bf10e9530ee65db263a2c7028d1..c6930c6a53e886d12abc1c4bd3447b4617cf92ae 100644 (file)
@@ -74,7 +74,7 @@ This module defines the following functions:
 
 
 
-.. function:: readPlistFromResource(path[, restype='plst'[, resid=0]])
+.. function:: readPlistFromResource(path, restype='plst', resid=0)
 
     Read a plist from the resource with type *restype* from the resource fork of
     *path*.  Availability: Mac OS X.
@@ -84,7 +84,7 @@ This module defines the following functions:
        In Python 3.x, this function has been removed.
 
 
-.. function:: writePlistToResource(rootObject, path[, restype='plst'[, resid=0]])
+.. function:: writePlistToResource(rootObject, path, restype='plst', resid=0)
 
     Write *rootObject* as a resource with type *restype* to the resource fork of
     *path*.  Availability: Mac OS X.
index 236324d2e8c992fc7f412961a85ab03ee505572f..0113178b176435c6caa66d76125d83b812c469d5 100644 (file)
@@ -298,7 +298,7 @@ Analysis of the profiler data is done using the :class:`Stats` class.
    :synopsis: Statistics object for use with the profiler.
 
 
-.. class:: Stats(filename[, stream=sys.stdout[, ...]])
+.. class:: Stats(filename, stream=sys.stdout[, ...])
 
    This class constructor creates an instance of a "statistics object" from a
    *filename* (or set of filenames).  :class:`Stats` objects are manipulated by
index 2f81451e9fef4eb7e4006a8438fc36a83029a7f3..13eaabf594700236b215eab3c44b9607185e0a45 100644 (file)
@@ -19,7 +19,7 @@ not implemented in Python, including all standard and optional extension
 modules.
 
 
-.. function:: readmodule(module[, path=None])
+.. function:: readmodule(module, path=None)
 
    Read a module and return a dictionary mapping class names to class
    descriptor objects.  The parameter *module* should be the name of a
@@ -28,7 +28,7 @@ modules.
    of ``sys.path``, which is used to locate module source code.
 
 
-.. function:: readmodule_ex(module[, path=None])
+.. function:: readmodule_ex(module, path=None)
 
    Like :func:`readmodule`, but the returned dictionary, in addition to
    mapping class names to class descriptor objects, also maps top-level
index de12420137a7836923b26d09e3240ef73e401612..ad36b4589691b5d9c5dad96ce036556161164f16 100644 (file)
@@ -18,7 +18,7 @@ This includes most class instances, recursive data types, and objects containing
 lots of shared  sub-objects.  The keys are ordinary strings.
 
 
-.. function:: open(filename[, flag='c'[, protocol=None[, writeback=False]]])
+.. function:: open(filename, flag='c', protocol=None, writeback=False)
 
    Open a persistent dictionary.  The filename specified is the base filename for
    the underlying database.  As a side-effect, an extension may be added to the
@@ -100,7 +100,7 @@ Restrictions
   implementation used.
 
 
-.. class:: Shelf(dict[, protocol=None[, writeback=False]])
+.. class:: Shelf(dict, protocol=None, writeback=False)
 
    A subclass of :class:`UserDict.DictMixin` which stores pickled values in the
    *dict* object.
@@ -118,7 +118,7 @@ Restrictions
    memory and make sync and close take a long time.
 
 
-.. class:: BsdDbShelf(dict[, protocol=None[, writeback=False]])
+.. class:: BsdDbShelf(dict, protocol=None, writeback=False)
 
    A subclass of :class:`Shelf` which exposes :meth:`first`, :meth:`!next`,
    :meth:`previous`, :meth:`last` and :meth:`set_location` which are available in
@@ -129,7 +129,7 @@ Restrictions
    the same interpretation as for the :class:`Shelf` class.
 
 
-.. class:: DbfilenameShelf(filename[, flag='c'[, protocol=None[, writeback=False]]])
+.. class:: DbfilenameShelf(filename, flag='c', protocol=None, writeback=False)
 
    A subclass of :class:`Shelf` which accepts a *filename* instead of a dict-like
    object.  The underlying file will be opened using :func:`anydbm.open`.  By
index 31231b662adf062927e0803895f0550fce83c9f4..a1e1696fcb3c751cc2943c3423d112ced1e4ba1e 100644 (file)
@@ -96,7 +96,7 @@ Directory and files operations
    .. versionadded:: 2.6
 
 
-.. function:: copytree(src, dst[, symlinks=False[, ignore=None]])
+.. function:: copytree(src, dst, symlinks=False, ignore=None)
 
    Recursively copy an entire directory tree rooted at *src*.  The destination
    directory, named by *dst*, must not already exist; it will be created as
index 4331665b4673633f3a0605aa1a63df9b34c80891..0016fcb991ddacc9b0cdafe84bbb41b45e6ff4d2 100644 (file)
@@ -386,7 +386,7 @@ The :mod:`struct` module also defines the following type:
       (``len(string)`` must equal :attr:`self.size`).
 
 
-   .. method:: unpack_from(buffer[, offset=0])
+   .. method:: unpack_from(buffer, offset=0)
 
       Identical to the :func:`unpack_from` function, using the compiled format.
       (``len(buffer[offset:])`` must be at least :attr:`self.size`).
index 61e13feb09674c15f8d5c99955d0eaa8b77694f3..2b44f91eaf15f5949b3ff2a488d5fdbb248a46d6 100644 (file)
@@ -114,7 +114,7 @@ The module also defines three convenience functions:
    time.  This means that other processes running on the same computer may
    interfere with the timing.
 
-.. function:: repeat(stmt[, setup[, timer[, repeat=3 [, number=1000000]]]])
+.. function:: repeat(stmt, setup='pass', timer=default_timer, repeat=3 , number=1000000)
 
    Create a :class:`Timer` instance with the given statement, setup code and timer
    function and run its :meth:`repeat` method with the given repeat count and
@@ -123,7 +123,7 @@ The module also defines three convenience functions:
    .. versionadded:: 2.6
 
 
-.. function:: timeit(stmt[, setup[, timer[, number=1000000]]])
+.. function:: timeit(stmt, setup='pass', timer=default_timer, number=1000000)
 
    Create a :class:`Timer` instance with the given statement, setup code and timer
    function and run its :meth:`timeit` method with *number* executions.
index a2afda184331e20b24839ef57a2d6785e60eb9d7..9cd4996be560cc401ebdd504ab181bfd3c0d408c 100644 (file)
@@ -149,7 +149,7 @@ Programmatic Interface
        the current tracing parameters.  *cmd* must be a string or code object,
        suitable for passing into :func:`exec`.
 
-    .. method:: runctx(cmd[, globals=None[, locals=None]])
+    .. method:: runctx(cmd, globals=None, locals=None)
 
        Execute the command and gather statistics from the execution with the
        current tracing parameters, in the defined global and local
index 0721234a2fb332e27f252d94fc7992233544efa1..f96111de218b4840c22f9544501bc057a379a419 100644 (file)
@@ -265,7 +265,7 @@ Besides the methods described below, the :class:`ttk.Widget` class supports the
       *x* and *y* are pixel coordinates relative to the widget.
 
 
-   .. method:: instate(statespec[, callback=None[, *args[, **kw]]])
+   .. method:: instate(statespec, callback=None, *args, **kw)
 
       Test the widget's state. If a callback is not specified, returns True
       if the widget state matches *statespec* and False otherwise. If callback
@@ -523,7 +523,7 @@ ttk.Notebook
       omitted, returns the widget name of the currently selected pane.
 
 
-   .. method:: tab(tab_id[, option=None[, **kw]])
+   .. method:: tab(tab_id, option=None, **kw)
 
       Query or modify the options of the specific *tab_id*.
 
@@ -846,7 +846,7 @@ ttk.Treeview
 
 .. class:: Treeview
 
-   .. method:: bbox(item[, column=None])
+   .. method:: bbox(item, column=None)
 
       Returns the bounding box (relative to the treeview widget's window) of
       the specified *item* in the form (x, y, width, height).
@@ -873,7 +873,7 @@ ttk.Treeview
       *item*'s children.
 
 
-   .. method:: column(column[, option=None[, **kw]])
+   .. method:: column(column, option=None, **kw)
 
       Query or modify the options for the specified *column*.
 
@@ -928,7 +928,7 @@ ttk.Treeview
       the current focus item, or '' if there is none.
 
 
-   .. method:: heading(column[, option=None[, **kw]])
+   .. method:: heading(column, option=None, **kw)
 
       Query or modify the heading options for the specified *column*.
 
@@ -1001,7 +1001,7 @@ ttk.Treeview
       Returns the integer index of *item* within its parent's list of children.
 
 
-   .. method:: insert(parent, index[, iid=None[, **kw]])
+   .. method:: insert(parent, index, iid=None, **kw)
 
       Creates a new item and returns the item identifier of the newly created
       item.
@@ -1096,7 +1096,7 @@ ttk.Treeview
       Toggle the selection state of each item in *items*.
 
 
-   .. method:: set(item[, column=None[, value=None]])
+   .. method:: set(item, column=None, value=None)
 
       With one argument, returns a dictionary of column/value pairs for the
       specified *item*. With two arguments, returns the current value of the
@@ -1104,14 +1104,14 @@ ttk.Treeview
       *column* in given *item* to the specified *value*.
 
 
-   .. method:: tag_bind(tagname[, sequence=None[, callback=None]])
+   .. method:: tag_bind(tagname, sequence=None, callback=None)
 
       Bind a callback for the given event *sequence* to the tag *tagname*.
       When an event is delivered to an item, the callbacks for each of the
       item's tags option are called.
 
 
-   .. method:: tag_configure(tagname[, option=None[, **kw]])
+   .. method:: tag_configure(tagname, option=None, **kw)
 
       Query or modify the options for the specified *tagname*.
 
@@ -1220,7 +1220,7 @@ option. If the class name of a widget is unknown, use the method
       foreground option, for example, you would get a blue foreground
       when the widget is in the active or pressed states.
 
-   .. method:: lookup(style, option[, state=None[, default=None]])
+   .. method:: lookup(style, option, state=None, default=None)
 
       Returns the value specified for *option* in *style*.
 
@@ -1235,7 +1235,7 @@ option. If the class name of a widget is unknown, use the method
          print ttk.Style().lookup("TButton", "font")
 
 
-   .. method:: layout(style[, layoutspec=None])
+   .. method:: layout(style, layoutspec=None)
 
       Define the widget layout for given *style*. If *layoutspec* is omitted,
       return the layout specification for given style.
@@ -1318,7 +1318,7 @@ option. If the class name of a widget is unknown, use the method
       Returns the list of *elementname*'s options.
 
 
-   .. method:: theme_create(themename[, parent=None[, settings=None]])
+   .. method:: theme_create(themename, parent=None, settings=None)
 
       Create a new theme.
 
index b978777bd4d07bc814a9455962c8bb176fbb0416..56c444d42ff1a5fdf899e01c564a05cd3e832b06 100644 (file)
@@ -48,7 +48,7 @@ The following exception is defined:
 The following functions are defined:
 
 
-.. function:: open(url[, new=0[, autoraise=True]])
+.. function:: open(url, new=0, autoraise=True)
 
    Display *url* using the default browser. If *new* is 0, the *url* is opened
    in the same browser window if possible.  If *new* is 1, a new browser window
@@ -178,7 +178,7 @@ Browser controllers provide these methods which parallel three of the
 module-level convenience functions:
 
 
-.. method:: controller.open(url[, new=0[, autoraise=True]])
+.. method:: controller.open(url, new=0, autoraise=True)
 
    Display *url* using the browser handled by this controller. If *new* is 1, a new
    browser window is opened if possible. If *new* is 2, a new browser page ("tab")
index 31634972e4582910378de0be5337df758e481a6f..0b0c7c2245efa70f5d9e59f211c47c419398377c 100644 (file)
@@ -59,7 +59,7 @@ parameter expect a WSGI-compliant dictionary to be supplied; please see
    found, and "http" otherwise.
 
 
-.. function:: request_uri(environ [, include_query=1])
+.. function:: request_uri(environ, include_query=1)
 
    Return the full request URI, optionally including the query string, using the
    algorithm found in the "URL Reconstruction" section of :pep:`333`.  If
@@ -148,7 +148,7 @@ also provides these miscellaneous utilities:
    :rfc:`2616`.
 
 
-.. class:: FileWrapper(filelike [, blksize=8192])
+.. class:: FileWrapper(filelike, blksize=8192)
 
    A wrapper to convert a file-like object to an :term:`iterator`.  The resulting objects
    support both :meth:`__getitem__` and :meth:`__iter__` iteration styles, for
@@ -271,7 +271,7 @@ request.  (E.g., using the :func:`shift_path_info` function from
 :mod:`wsgiref.util`.)
 
 
-.. function:: make_server(host, port, app [, server_class=WSGIServer [, handler_class=WSGIRequestHandler]])
+.. function:: make_server(host, port, app, server_class=WSGIServer, handler_class=WSGIRequestHandler)
 
    Create a new WSGI server listening on *host* and *port*, accepting connections
    for *app*.  The return value is an instance of the supplied *server_class*, and
@@ -460,7 +460,7 @@ input, output, and error streams.
    environment.
 
 
-.. class:: BaseCGIHandler(stdin, stdout, stderr, environ [, multithread=True [, multiprocess=False]])
+.. class:: BaseCGIHandler(stdin, stdout, stderr, environ, multithread=True, multiprocess=False)
 
    Similar to :class:`CGIHandler`, but instead of using the :mod:`sys` and
    :mod:`os` modules, the CGI environment and I/O streams are specified explicitly.
@@ -475,7 +475,7 @@ input, output, and error streams.
    instead of :class:`SimpleHandler`.
 
 
-.. class:: SimpleHandler(stdin, stdout, stderr, environ [,multithread=True [, multiprocess=False]])
+.. class:: SimpleHandler(stdin, stdout, stderr, environ, multithread=True, multiprocess=False)
 
    Similar to :class:`BaseCGIHandler`, but designed for use with HTTP origin
    servers.  If you are writing an HTTP server implementation, you will probably
index ca19d98abb3b5eac5ed8e8a0d31967b2429473ad..0ea801520d09aff3b5afbea6d8b18bfcf5b48cc0 100644 (file)
@@ -129,7 +129,7 @@ module documentation.  This section lists the differences between the API and
    to discard children of that node.
 
 
-.. method:: Node.writexml(writer[, indent=""[, addindent=""[, newl=""]]])
+.. method:: Node.writexml(writer, indent="", addindent="", newl="")
 
    Write XML to the writer object.  The writer should have a :meth:`write` method
    which matches that of the file object interface.  The *indent* parameter is the