summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorHynek Schlawack <hs@ox.cx>2012-05-22 08:27:40 (GMT)
committerHynek Schlawack <hs@ox.cx>2012-05-22 08:27:40 (GMT)
commite58ce01f303c8e0a7ddf008abc365cfe6fb4416c (patch)
tree4a06bd6c073810b2def83534787ec7d56fd672c6 /Doc/library
parented8cf7a543b3ebe2d61c16d0f87e60029fd2c478 (diff)
downloadcpython-e58ce01f303c8e0a7ddf008abc365cfe6fb4416c.zip
cpython-e58ce01f303c8e0a7ddf008abc365cfe6fb4416c.tar.gz
cpython-e58ce01f303c8e0a7ddf008abc365cfe6fb4416c.tar.bz2
#14804: Remove [] around optional arguments with default values
Mostly just mechanical removal of []. In some rare cases I've pulled the default value up into the argument list.
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/bdb.rst4
-rw-r--r--Doc/library/csv.rst6
-rw-r--r--Doc/library/difflib.rst4
-rw-r--r--Doc/library/dl.rst2
-rw-r--r--Doc/library/formatter.rst4
-rw-r--r--Doc/library/functions.rst4
-rw-r--r--Doc/library/httplib.rst2
-rw-r--r--Doc/library/itertools.rst2
-rw-r--r--Doc/library/mailbox.rst16
-rw-r--r--Doc/library/os.rst4
-rw-r--r--Doc/library/ossaudiodev.rst2
-rw-r--r--Doc/library/parser.rst2
-rw-r--r--Doc/library/pickletools.rst2
-rw-r--r--Doc/library/plistlib.rst4
-rw-r--r--Doc/library/profile.rst2
-rw-r--r--Doc/library/pyclbr.rst4
-rw-r--r--Doc/library/shelve.rst8
-rw-r--r--Doc/library/shutil.rst2
-rw-r--r--Doc/library/struct.rst2
-rw-r--r--Doc/library/timeit.rst4
-rw-r--r--Doc/library/trace.rst2
-rw-r--r--Doc/library/ttk.rst24
-rw-r--r--Doc/library/webbrowser.rst4
-rw-r--r--Doc/library/wsgiref.rst10
-rw-r--r--Doc/library/xml.dom.minidom.rst2
25 files changed, 61 insertions, 61 deletions
diff --git a/Doc/library/bdb.rst b/Doc/library/bdb.rst
index bd2b16f..1cbb8f6 100644
--- a/Doc/library/bdb.rst
+++ b/Doc/library/bdb.rst
@@ -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*
diff --git a/Doc/library/csv.rst b/Doc/library/csv.rst
index f4e9d7c..33b39f2 100644
--- a/Doc/library/csv.rst
+++ b/Doc/library/csv.rst
@@ -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
diff --git a/Doc/library/difflib.rst b/Doc/library/difflib.rst
index 225b486..f3b23e0 100644
--- a/Doc/library/difflib.rst
+++ b/Doc/library/difflib.rst
@@ -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
diff --git a/Doc/library/dl.rst b/Doc/library/dl.rst
index 40556cc..92de1dc 100644
--- a/Doc/library/dl.rst
+++ b/Doc/library/dl.rst
@@ -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
diff --git a/Doc/library/formatter.rst b/Doc/library/formatter.rst
index ba09b8e..e696fec 100644
--- a/Doc/library/formatter.rst
+++ b/Doc/library/formatter.rst
@@ -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.
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index f375558..54baecf 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -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
diff --git a/Doc/library/httplib.rst b/Doc/library/httplib.rst
index 0a6968f..1e37cdf 100644
--- a/Doc/library/httplib.rst
+++ b/Doc/library/httplib.rst
@@ -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.
diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst
index a553d09..477ea86 100644
--- a/Doc/library/itertools.rst
+++ b/Doc/library/itertools.rst
@@ -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::
diff --git a/Doc/library/mailbox.rst b/Doc/library/mailbox.rst
index 5cdb683..54ade5a 100644
--- a/Doc/library/mailbox.rst
+++ b/Doc/library/mailbox.rst
@@ -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
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index 7102c76..8569f82 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -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
diff --git a/Doc/library/ossaudiodev.rst b/Doc/library/ossaudiodev.rst
index 00c113b..515c701 100644
--- a/Doc/library/ossaudiodev.rst
+++ b/Doc/library/ossaudiodev.rst
@@ -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*
diff --git a/Doc/library/parser.rst b/Doc/library/parser.rst
index 554229f..e2d4523 100644
--- a/Doc/library/parser.rst
+++ b/Doc/library/parser.rst
@@ -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
diff --git a/Doc/library/pickletools.rst b/Doc/library/pickletools.rst
index ce47c97..ebb30ab 100644
--- a/Doc/library/pickletools.rst
+++ b/Doc/library/pickletools.rst
@@ -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.
diff --git a/Doc/library/plistlib.rst b/Doc/library/plistlib.rst
index 11268c2..c6930c6 100644
--- a/Doc/library/plistlib.rst
+++ b/Doc/library/plistlib.rst
@@ -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.
diff --git a/Doc/library/profile.rst b/Doc/library/profile.rst
index 236324d..0113178 100644
--- a/Doc/library/profile.rst
+++ b/Doc/library/profile.rst
@@ -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
diff --git a/Doc/library/pyclbr.rst b/Doc/library/pyclbr.rst
index 2f81451..13eaabf 100644
--- a/Doc/library/pyclbr.rst
+++ b/Doc/library/pyclbr.rst
@@ -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
diff --git a/Doc/library/shelve.rst b/Doc/library/shelve.rst
index de12420..ad36b45 100644
--- a/Doc/library/shelve.rst
+++ b/Doc/library/shelve.rst
@@ -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
diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst
index 31231b6..a1e1696 100644
--- a/Doc/library/shutil.rst
+++ b/Doc/library/shutil.rst
@@ -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
diff --git a/Doc/library/struct.rst b/Doc/library/struct.rst
index 4331665..0016fcb 100644
--- a/Doc/library/struct.rst
+++ b/Doc/library/struct.rst
@@ -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`).
diff --git a/Doc/library/timeit.rst b/Doc/library/timeit.rst
index 61e13fe..2b44f91 100644
--- a/Doc/library/timeit.rst
+++ b/Doc/library/timeit.rst
@@ -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.
diff --git a/Doc/library/trace.rst b/Doc/library/trace.rst
index a2afda1..9cd4996 100644
--- a/Doc/library/trace.rst
+++ b/Doc/library/trace.rst
@@ -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
diff --git a/Doc/library/ttk.rst b/Doc/library/ttk.rst
index 0721234..f96111d 100644
--- a/Doc/library/ttk.rst
+++ b/Doc/library/ttk.rst
@@ -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.
diff --git a/Doc/library/webbrowser.rst b/Doc/library/webbrowser.rst
index b978777..56c444d 100644
--- a/Doc/library/webbrowser.rst
+++ b/Doc/library/webbrowser.rst
@@ -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")
diff --git a/Doc/library/wsgiref.rst b/Doc/library/wsgiref.rst
index 3163497..0b0c7c2 100644
--- a/Doc/library/wsgiref.rst
+++ b/Doc/library/wsgiref.rst
@@ -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
diff --git a/Doc/library/xml.dom.minidom.rst b/Doc/library/xml.dom.minidom.rst
index ca19d98..0ea8015 100644
--- a/Doc/library/xml.dom.minidom.rst
+++ b/Doc/library/xml.dom.minidom.rst
@@ -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