summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-10-06 10:26:05 (GMT)
committerGeorg Brandl <georg@python.org>2010-10-06 10:26:05 (GMT)
commit682d7e0e07bc29de4578f48be66756c5b969776f (patch)
tree4e1c379e13ebca676c4fbee38ed251ecc88c1133 /Doc/library
parentfa4f7f97b8af16c02441443e448986c07f4cd254 (diff)
downloadcpython-682d7e0e07bc29de4578f48be66756c5b969776f.zip
cpython-682d7e0e07bc29de4578f48be66756c5b969776f.tar.gz
cpython-682d7e0e07bc29de4578f48be66756c5b969776f.tar.bz2
Fix errors found by "make suspicious".
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/argparse.rst14
-rw-r--r--Doc/library/datetime.rst2
-rw-r--r--Doc/library/functions.rst14
-rw-r--r--Doc/library/io.rst2
-rw-r--r--Doc/library/optparse.rst2
-rw-r--r--Doc/library/subprocess.rst2
-rw-r--r--Doc/library/wsgiref.rst2
7 files changed, 20 insertions, 18 deletions
diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst
index a30a8c4..f50492a 100644
--- a/Doc/library/argparse.rst
+++ b/Doc/library/argparse.rst
@@ -737,14 +737,14 @@ values are:
* N (an integer). N args from the command-line will be gathered together into a
list. For example::
- >>> parser = argparse.ArgumentParser()
- >>> parser.add_argument('--foo', nargs=2)
- >>> parser.add_argument('bar', nargs=1)
- >>> parser.parse_args('c --foo a b'.split())
- Namespace(bar=['c'], foo=['a', 'b'])
+ >>> parser = argparse.ArgumentParser()
+ >>> parser.add_argument('--foo', nargs=2)
+ >>> parser.add_argument('bar', nargs=1)
+ >>> parser.parse_args('c --foo a b'.split())
+ Namespace(bar=['c'], foo=['a', 'b'])
- Note that ``nargs=1`` produces a list of one item. This is different from
- the default, in which the item is produced by itself.
+ Note that ``nargs=1`` produces a list of one item. This is different from
+ the default, in which the item is produced by itself.
* ``'?'``. One arg will be consumed from the command-line if possible, and
produced as a single item. If no command-line arg is present, the value from
diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst
index 714286f..b9adbcc 100644
--- a/Doc/library/datetime.rst
+++ b/Doc/library/datetime.rst
@@ -979,7 +979,7 @@ Instance methods:
d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` is the day number within
the current year starting with ``1`` for January 1st. The :attr:`tm_isdst` flag
of the result is set according to the :meth:`dst` method: :attr:`tzinfo` is
- ``None`` or :meth:`dst`` returns ``None``, :attr:`tm_isdst` is set to ``-1``;
+ ``None`` or :meth:`dst` returns ``None``, :attr:`tm_isdst` is set to ``-1``;
else if :meth:`dst` returns a non-zero value, :attr:`tm_isdst` is set to ``1``;
else :attr:`tm_isdst` is set to ``0``.
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index 4f1c91c..97f2a38 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -634,9 +634,9 @@ are always available. They are listed here in alphabetical order.
The optional keyword-only *key* argument specifies a one-argument ordering
function like that used for :meth:`list.sort`.
- If multiple items are maximal, the function returns the first one encountered.
- This is consistent with other sort-stability preserving tools such as
- ``sorted(iterable, key=keyfunc, reverse=True)[0]` and
+ If multiple items are maximal, the function returns the first one
+ encountered. This is consistent with other sort-stability preserving tools
+ such as ``sorted(iterable, key=keyfunc, reverse=True)[0]`` and
``heapq.nlargest(1, iterable, key=keyfunc)``.
.. function:: memoryview(obj)
@@ -655,10 +655,10 @@ are always available. They are listed here in alphabetical order.
The optional keyword-only *key* argument specifies a one-argument ordering
function like that used for :meth:`list.sort`.
- If multiple items are minimal, the function returns the first one encountered.
- This is consistent with other sort-stability preserving tools such as
- ``sorted(iterable, key=keyfunc)[0]` and
- ``heapq.nsmallest(1, iterable, key=keyfunc)``.
+ If multiple items are minimal, the function returns the first one
+ encountered. This is consistent with other sort-stability preserving tools
+ such as ``sorted(iterable, key=keyfunc)[0]`` and ``heapq.nsmallest(1,
+ iterable, key=keyfunc)``.
.. function:: next(iterator[, default])
diff --git a/Doc/library/io.rst b/Doc/library/io.rst
index 3e0c62d..5a2de14 100644
--- a/Doc/library/io.rst
+++ b/Doc/library/io.rst
@@ -179,7 +179,7 @@ The :class:`BufferedIOBase` ABC deals with buffering on a raw byte stream
:class:`BufferedReader`, and :class:`BufferedRWPair` buffer streams that are
readable, writable, and both readable and writable. :class:`BufferedRandom`
provides a buffered interface to random access streams. Another
-:class`BufferedIOBase` subclass, :class:`BytesIO`, is a stream of in-memory
+:class:`BufferedIOBase` subclass, :class:`BytesIO`, is a stream of in-memory
bytes.
The :class:`TextIOBase` ABC, another subclass of :class:`IOBase`, deals with
diff --git a/Doc/library/optparse.rst b/Doc/library/optparse.rst
index 37226c3..e7de741 100644
--- a/Doc/library/optparse.rst
+++ b/Doc/library/optparse.rst
@@ -1212,7 +1212,7 @@ error message.
:func:`float` and :func:`complex`, with similar error-handling.
``"choice"`` options are a subtype of ``"string"`` options. The
-:attr:`~Option.choices`` option attribute (a sequence of strings) defines the
+:attr:`~Option.choices` option attribute (a sequence of strings) defines the
set of allowed option arguments. :func:`optparse.check_choice` compares
user-supplied option arguments against this master list and raises
:exc:`OptionValueError` if an invalid string is given.
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
index 3671407..29b02e9 100644
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -271,6 +271,7 @@ This module also defines four shortcut functions:
.. function:: getstatusoutput(cmd)
+
Return ``(status, output)`` of executing *cmd* in a shell.
Execute the string *cmd* in a shell with :func:`os.popen` and return a 2-tuple
@@ -290,6 +291,7 @@ This module also defines four shortcut functions:
.. function:: getoutput(cmd)
+
Return output (stdout and stderr) of executing *cmd* in a shell.
Like :func:`getstatusoutput`, except the exit status is ignored and the return
diff --git a/Doc/library/wsgiref.rst b/Doc/library/wsgiref.rst
index 6420162..fda9e70 100644
--- a/Doc/library/wsgiref.rst
+++ b/Doc/library/wsgiref.rst
@@ -708,7 +708,7 @@ This is a working "Hello World" WSGI application::
# use a function (note that you're not limited to a function, you can
# use a class for example). The first argument passed to the function
# is a dictionary containing CGI-style envrironment variables and the
- # second variable is the callable object (see :pep:`333`)
+ # second variable is the callable object (see PEP 333).
def hello_world_app(environ, start_response):
status = b'200 OK' # HTTP Status
headers = [(b'Content-type', b'text/plain; charset=utf-8')] # HTTP Headers