Commit 72472b36 authored by Martin Panter's avatar Martin Panter

Issue #25161: Add full stops in documentation; patch by Takase Arihiro

parent 23d684a8
...@@ -29,7 +29,7 @@ bound into a function. ...@@ -29,7 +29,7 @@ bound into a function.
.. c:function:: int PyCode_Check(PyObject *co) .. c:function:: int PyCode_Check(PyObject *co)
Return true if *co* is a :class:`code` object Return true if *co* is a :class:`code` object.
.. c:function:: int PyCode_GetNumFree(PyCodeObject *co) .. c:function:: int PyCode_GetNumFree(PyCodeObject *co)
......
...@@ -17,7 +17,7 @@ than explicitly calling :c:func:`PyGen_New`. ...@@ -17,7 +17,7 @@ than explicitly calling :c:func:`PyGen_New`.
.. c:var:: PyTypeObject PyGen_Type .. c:var:: PyTypeObject PyGen_Type
The type object corresponding to generator objects The type object corresponding to generator objects.
.. c:function:: int PyGen_Check(ob) .. c:function:: int PyGen_Check(ob)
......
...@@ -201,7 +201,7 @@ the same library that the Python runtime is using. ...@@ -201,7 +201,7 @@ the same library that the Python runtime is using.
.. c:function:: struct _node* PyParser_SimpleParseFile(FILE *fp, const char *filename, int start) .. c:function:: struct _node* PyParser_SimpleParseFile(FILE *fp, const char *filename, int start)
This is a simplified interface to :c:func:`PyParser_SimpleParseFileFlags` below, This is a simplified interface to :c:func:`PyParser_SimpleParseFileFlags` below,
leaving *flags* set to ``0`` leaving *flags* set to ``0``.
.. c:function:: struct _node* PyParser_SimpleParseFileFlags(FILE *fp, const char *filename, int start, int flags) .. c:function:: struct _node* PyParser_SimpleParseFileFlags(FILE *fp, const char *filename, int start, int flags)
......
...@@ -920,7 +920,7 @@ timestamp dependency analysis. ...@@ -920,7 +920,7 @@ timestamp dependency analysis.
Walk two filename lists in parallel, testing if each source is newer than its Walk two filename lists in parallel, testing if each source is newer than its
corresponding target. Return a pair of lists (*sources*, *targets*) where corresponding target. Return a pair of lists (*sources*, *targets*) where
source is newer than target, according to the semantics of :func:`newer` source is newer than target, according to the semantics of :func:`newer`.
.. % % equivalent to a listcomp... .. % % equivalent to a listcomp...
......
...@@ -867,7 +867,7 @@ Glossary ...@@ -867,7 +867,7 @@ Glossary
without interfering with the behaviour of other Python applications without interfering with the behaviour of other Python applications
running on the same system. running on the same system.
See also :ref:`scripts-pyvenv` See also :ref:`scripts-pyvenv`.
virtual machine virtual machine
A computer defined entirely in software. Python's virtual machine A computer defined entirely in software. Python's virtual machine
......
...@@ -271,7 +271,7 @@ and off individually. They are described here in more detail. ...@@ -271,7 +271,7 @@ and off individually. They are described here in more detail.
.. 2to3fixer:: input .. 2to3fixer:: input
Converts ``input(prompt)`` to ``eval(input(prompt))`` Converts ``input(prompt)`` to ``eval(input(prompt))``.
.. 2to3fixer:: intern .. 2to3fixer:: intern
......
...@@ -1984,4 +1984,4 @@ A partial upgrade path from :mod:`optparse` to :mod:`argparse`: ...@@ -1984,4 +1984,4 @@ A partial upgrade path from :mod:`optparse` to :mod:`argparse`:
``%(default)s`` and ``%(prog)s``. ``%(default)s`` and ``%(prog)s``.
* Replace the OptionParser constructor ``version`` argument with a call to * Replace the OptionParser constructor ``version`` argument with a call to
``parser.add_argument('--version', action='version', version='<the version>')`` ``parser.add_argument('--version', action='version', version='<the version>')``.
...@@ -232,7 +232,7 @@ BaseSubprocessTransport ...@@ -232,7 +232,7 @@ BaseSubprocessTransport
.. method:: kill(self) .. method:: kill(self)
Kill the subprocess, as in :meth:`subprocess.Popen.kill` Kill the subprocess, as in :meth:`subprocess.Popen.kill`.
On POSIX systems, the function sends SIGKILL to the subprocess. On POSIX systems, the function sends SIGKILL to the subprocess.
On Windows, this method is an alias for :meth:`terminate`. On Windows, this method is an alias for :meth:`terminate`.
......
...@@ -231,7 +231,7 @@ The :mod:`bdb` module also defines two classes: ...@@ -231,7 +231,7 @@ The :mod:`bdb` module also defines two classes:
.. method:: set_until(frame) .. method:: set_until(frame)
Stop when the line with the line no greater than the current one is Stop when the line with the line no greater than the current one is
reached or when returning from current frame reached or when returning from current frame.
.. method:: set_trace([frame]) .. method:: set_trace([frame])
......
...@@ -543,7 +543,7 @@ advance:: ...@@ -543,7 +543,7 @@ advance::
Due to the way the decorator protocol works, a callback function Due to the way the decorator protocol works, a callback function
declared this way cannot take any parameters. Instead, any resources to declared this way cannot take any parameters. Instead, any resources to
be released must be accessed as closure variables be released must be accessed as closure variables.
Using a context manager as a function decorator Using a context manager as a function decorator
......
...@@ -845,7 +845,7 @@ Decimal objects ...@@ -845,7 +845,7 @@ Decimal objects
Engineering notation has an exponent which is a multiple of 3, so there Engineering notation has an exponent which is a multiple of 3, so there
are up to 3 digits left of the decimal place. For example, converts are up to 3 digits left of the decimal place. For example, converts
``Decimal('123E+1')`` to ``Decimal('1.23E+3')`` ``Decimal('123E+1')`` to ``Decimal('1.23E+3')``.
.. method:: to_integral(rounding=None, context=None) .. method:: to_integral(rounding=None, context=None)
......
...@@ -234,5 +234,5 @@ new entries to the global character set, alias, and codec registries: ...@@ -234,5 +234,5 @@ new entries to the global character set, alias, and codec registries:
*charset* is the canonical name of a character set. *codecname* is the name of a *charset* is the canonical name of a character set. *codecname* is the name of a
Python codec, as appropriate for the second argument to the :class:`str`'s Python codec, as appropriate for the second argument to the :class:`str`'s
:meth:`~str.encode` method :meth:`~str.encode` method.
...@@ -708,7 +708,7 @@ allow one to do things with an :class:`Enum` class that fail on a typical ...@@ -708,7 +708,7 @@ allow one to do things with an :class:`Enum` class that fail on a typical
class, such as `list(Color)` or `some_var in Color`. :class:`EnumMeta` is class, such as `list(Color)` or `some_var in Color`. :class:`EnumMeta` is
responsible for ensuring that various other methods on the final :class:`Enum` responsible for ensuring that various other methods on the final :class:`Enum`
class are correct (such as :meth:`__new__`, :meth:`__getnewargs__`, class are correct (such as :meth:`__new__`, :meth:`__getnewargs__`,
:meth:`__str__` and :meth:`__repr__`) :meth:`__str__` and :meth:`__repr__`).
Enum Members (aka instances) Enum Members (aka instances)
......
...@@ -603,7 +603,7 @@ module for more information. ...@@ -603,7 +603,7 @@ module for more information.
.. exception:: SyntaxWarning .. exception:: SyntaxWarning
Base class for warnings about dubious syntax Base class for warnings about dubious syntax.
.. exception:: RuntimeWarning .. exception:: RuntimeWarning
......
...@@ -97,7 +97,7 @@ another rational number, or from a string. ...@@ -97,7 +97,7 @@ another rational number, or from a string.
This class method constructs a :class:`Fraction` representing the exact This class method constructs a :class:`Fraction` representing the exact
value of *flt*, which must be a :class:`float`. Beware that value of *flt*, which must be a :class:`float`. Beware that
``Fraction.from_float(0.3)`` is not the same value as ``Fraction(3, 10)`` ``Fraction.from_float(0.3)`` is not the same value as ``Fraction(3, 10)``.
.. note:: .. note::
......
...@@ -540,7 +540,7 @@ Netscape protocol strictness switches: ...@@ -540,7 +540,7 @@ Netscape protocol strictness switches:
.. attribute:: DefaultCookiePolicy.strict_ns_unverifiable .. attribute:: DefaultCookiePolicy.strict_ns_unverifiable
apply RFC 2965 rules on unverifiable transactions even to Netscape cookies Apply RFC 2965 rules on unverifiable transactions even to Netscape cookies.
.. attribute:: DefaultCookiePolicy.strict_ns_domain .. attribute:: DefaultCookiePolicy.strict_ns_domain
......
...@@ -84,7 +84,7 @@ Cookie Objects ...@@ -84,7 +84,7 @@ Cookie Objects
Return an encoded value. *val* can be any type, but return value must be a Return an encoded value. *val* can be any type, but return value must be a
string. This method does nothing in :class:`BaseCookie` --- it exists so it can string. This method does nothing in :class:`BaseCookie` --- it exists so it can
be overridden be overridden.
In general, it should be the case that :meth:`value_encode` and In general, it should be the case that :meth:`value_encode` and
:meth:`value_decode` are inverses on the range of *value_decode*. :meth:`value_decode` are inverses on the range of *value_decode*.
......
...@@ -717,7 +717,7 @@ find and load modules. ...@@ -717,7 +717,7 @@ find and load modules.
modules recognized by the standard import machinery. This is a modules recognized by the standard import machinery. This is a
helper for code which simply needs to know if a filesystem path helper for code which simply needs to know if a filesystem path
potentially refers to a module without needing any details on the kind potentially refers to a module without needing any details on the kind
of module (for example, :func:`inspect.getmodulename`) of module (for example, :func:`inspect.getmodulename`).
.. versionadded:: 3.3 .. versionadded:: 3.3
......
...@@ -337,7 +337,7 @@ Encoders and Decoders ...@@ -337,7 +337,7 @@ Encoders and Decoders
.. method:: decode(s) .. method:: decode(s)
Return the Python representation of *s* (a :class:`str` instance Return the Python representation of *s* (a :class:`str` instance
containing a JSON document) containing a JSON document).
.. method:: raw_decode(s) .. method:: raw_decode(s)
......
...@@ -204,7 +204,7 @@ The :mod:`locale` module defines the following exception and functions: ...@@ -204,7 +204,7 @@ The :mod:`locale` module defines the following exception and functions:
.. data:: RADIXCHAR .. data:: RADIXCHAR
Get the radix character (decimal dot, decimal comma, etc.) Get the radix character (decimal dot, decimal comma, etc.).
.. data:: THOUSEP .. data:: THOUSEP
......
...@@ -230,7 +230,7 @@ need to override. ...@@ -230,7 +230,7 @@ need to override.
renamed to the destination. renamed to the destination.
:param source: The source filename. This is normally the base :param source: The source filename. This is normally the base
filename, e.g. 'test.log' filename, e.g. 'test.log'.
:param dest: The destination filename. This is normally :param dest: The destination filename. This is normally
what the source is rotated to, e.g. 'test.log.1'. what the source is rotated to, e.g. 'test.log.1'.
......
...@@ -53,7 +53,7 @@ report of the imported modules will be printed. ...@@ -53,7 +53,7 @@ report of the imported modules will be printed.
.. attribute:: modules .. attribute:: modules
A dictionary mapping module names to modules. See A dictionary mapping module names to modules. See
:ref:`modulefinder-example` :ref:`modulefinder-example`.
.. _modulefinder-example: .. _modulefinder-example:
......
...@@ -18,7 +18,7 @@ documentation. ...@@ -18,7 +18,7 @@ documentation.
The module implements both the normal and wide char variants of the console I/O The module implements both the normal and wide char variants of the console I/O
api. The normal API deals only with ASCII characters and is of limited use api. The normal API deals only with ASCII characters and is of limited use
for internationalized applications. The wide char API should be used where for internationalized applications. The wide char API should be used where
ever possible ever possible.
.. versionchanged:: 3.3 .. versionchanged:: 3.3
Operations in this module now raise :exc:`OSError` where :exc:`IOError` Operations in this module now raise :exc:`OSError` where :exc:`IOError`
......
...@@ -1936,7 +1936,7 @@ itself. This means, for example, that one shared object can contain a second: ...@@ -1936,7 +1936,7 @@ itself. This means, for example, that one shared object can contain a second:
raised by :meth:`_callmethod`. raised by :meth:`_callmethod`.
Note in particular that an exception will be raised if *methodname* has Note in particular that an exception will be raised if *methodname* has
not been *exposed* not been *exposed*.
An example of the usage of :meth:`_callmethod`: An example of the usage of :meth:`_callmethod`:
...@@ -2042,7 +2042,7 @@ with the :class:`Pool` class. ...@@ -2042,7 +2042,7 @@ with the :class:`Pool` class.
If *callback* is specified then it should be a callable which accepts a If *callback* is specified then it should be a callable which accepts a
single argument. When the result becomes ready *callback* is applied to single argument. When the result becomes ready *callback* is applied to
it, that is unless the call failed, in which case the *error_callback* it, that is unless the call failed, in which case the *error_callback*
is applied instead is applied instead.
If *error_callback* is specified then it should be a callable which If *error_callback* is specified then it should be a callable which
accepts a single argument. If the target function fails, then accepts a single argument. If the target function fails, then
...@@ -2067,7 +2067,7 @@ with the :class:`Pool` class. ...@@ -2067,7 +2067,7 @@ with the :class:`Pool` class.
If *callback* is specified then it should be a callable which accepts a If *callback* is specified then it should be a callable which accepts a
single argument. When the result becomes ready *callback* is applied to single argument. When the result becomes ready *callback* is applied to
it, that is unless the call failed, in which case the *error_callback* it, that is unless the call failed, in which case the *error_callback*
is applied instead is applied instead.
If *error_callback* is specified then it should be a callable which If *error_callback* is specified then it should be a callable which
accepts a single argument. If the target function fails, then accepts a single argument. If the target function fails, then
......
...@@ -235,7 +235,7 @@ process more convenient: ...@@ -235,7 +235,7 @@ process more convenient:
.. function:: loads(bytes_object, \*, fix_imports=True, encoding="ASCII", errors="strict") .. function:: loads(bytes_object, \*, fix_imports=True, encoding="ASCII", errors="strict")
Read a pickled object hierarchy from a :class:`bytes` object and return the Read a pickled object hierarchy from a :class:`bytes` object and return the
reconstituted object hierarchy specified therein reconstituted object hierarchy specified therein.
The protocol version of the pickle is detected automatically, so no The protocol version of the pickle is detected automatically, so no
protocol argument is needed. Bytes past the pickled object's protocol argument is needed. Bytes past the pickled object's
......
...@@ -117,7 +117,7 @@ Cross Platform ...@@ -117,7 +117,7 @@ Cross Platform
.. function:: python_version() .. function:: python_version()
Returns the Python version as string ``'major.minor.patchlevel'`` Returns the Python version as string ``'major.minor.patchlevel'``.
Note that unlike the Python ``sys.version``, the returned value will always Note that unlike the Python ``sys.version``, the returned value will always
include the patchlevel (it defaults to 0). include the patchlevel (it defaults to 0).
......
...@@ -194,7 +194,7 @@ The following classes are available: ...@@ -194,7 +194,7 @@ The following classes are available:
It has one attribute, :attr:`data`, that can be used to retrieve the Python It has one attribute, :attr:`data`, that can be used to retrieve the Python
bytes object stored in it. bytes object stored in it.
.. deprecated:: 3.4 Use a :class:`bytes` object instead .. deprecated:: 3.4 Use a :class:`bytes` object instead.
The following constants are available: The following constants are available:
......
...@@ -461,7 +461,7 @@ provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules. ...@@ -461,7 +461,7 @@ provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules.
.. function:: get_archive_formats() .. function:: get_archive_formats()
Return a list of supported formats for archiving. Return a list of supported formats for archiving.
Each element of the returned sequence is a tuple ``(name, description)`` Each element of the returned sequence is a tuple ``(name, description)``.
By default :mod:`shutil` provides these formats: By default :mod:`shutil` provides these formats:
......
...@@ -629,7 +629,7 @@ always available. ...@@ -629,7 +629,7 @@ always available.
:term:`struct sequence` :data:`sys.version_info` may be used for a more :term:`struct sequence` :data:`sys.version_info` may be used for a more
human-friendly encoding of the same information. human-friendly encoding of the same information.
More details of ``hexversion`` can be found at :ref:`apiabiversion` More details of ``hexversion`` can be found at :ref:`apiabiversion`.
.. data:: implementation .. data:: implementation
......
...@@ -110,8 +110,9 @@ All the :mod:`ttk` Widgets accepts the following options: ...@@ -110,8 +110,9 @@ All the :mod:`ttk` Widgets accepts the following options:
| class | Specifies the window class. The class is used when querying | | class | Specifies the window class. The class is used when querying |
| | the option database for the window's other options, to | | | the option database for the window's other options, to |
| | determine the default bindtags for the window, and to select | | | determine the default bindtags for the window, and to select |
| | the widget's default layout and style. This is a read-only | | | the widget's default layout and style. This option is |
| | which may only be specified when the window is created | | | read-only, and may only be specified when the window is |
| | created. |
+-----------+--------------------------------------------------------------+ +-----------+--------------------------------------------------------------+
| cursor | Specifies the mouse cursor to be used for the widget. If set | | cursor | Specifies the mouse cursor to be used for the widget. If set |
| | to the empty string (the default), the cursor is inherited | | | to the empty string (the default), the cursor is inherited |
......
...@@ -201,7 +201,7 @@ The following classes are provided: ...@@ -201,7 +201,7 @@ The following classes are provided:
``"Python-urllib/2.6"`` (on Python 2.6). ``"Python-urllib/2.6"`` (on Python 2.6).
An example of using ``Content-Type`` header with *data* argument would be An example of using ``Content-Type`` header with *data* argument would be
sending a dictionary like ``{"Content-Type":" application/x-www-form-urlencoded;charset=utf-8"}`` sending a dictionary like ``{"Content-Type":" application/x-www-form-urlencoded;charset=utf-8"}``.
The final two arguments are only of interest for correct handling The final two arguments are only of interest for correct handling
of third-party HTTP cookies: of third-party HTTP cookies:
......
...@@ -501,7 +501,7 @@ input, output, and error streams. ...@@ -501,7 +501,7 @@ input, output, and error streams.
Similar to :class:`BaseCGIHandler`, but designed for use with HTTP origin Similar to :class:`BaseCGIHandler`, but designed for use with HTTP origin
servers. If you are writing an HTTP server implementation, you will probably servers. If you are writing an HTTP server implementation, you will probably
want to subclass this instead of :class:`BaseCGIHandler` want to subclass this instead of :class:`BaseCGIHandler`.
This class is a subclass of :class:`BaseHandler`. It overrides the This class is a subclass of :class:`BaseHandler`. It overrides the
:meth:`__init__`, :meth:`get_stdin`, :meth:`get_stderr`, :meth:`add_cgi_vars`, :meth:`__init__`, :meth:`get_stdin`, :meth:`get_stderr`, :meth:`add_cgi_vars`,
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
Model interface, with an API similar to that in other languages. It is intended Model interface, with an API similar to that in other languages. It is intended
to be simpler than the full DOM and also significantly smaller. Users who are to be simpler than the full DOM and also significantly smaller. Users who are
not already proficient with the DOM should consider using the not already proficient with the DOM should consider using the
:mod:`xml.etree.ElementTree` module for their XML processing instead :mod:`xml.etree.ElementTree` module for their XML processing instead.
.. warning:: .. warning::
......
...@@ -304,7 +304,7 @@ All of the components of an XML document are subclasses of :class:`Node`. ...@@ -304,7 +304,7 @@ All of the components of an XML document are subclasses of :class:`Node`.
.. attribute:: Node.prefix .. attribute:: Node.prefix
The part of the :attr:`tagName` preceding the colon if there is one, else the The part of the :attr:`tagName` preceding the colon if there is one, else the
empty string. The value is a string, or ``None`` empty string. The value is a string, or ``None``.
.. attribute:: Node.namespaceURI .. attribute:: Node.namespaceURI
......
...@@ -891,7 +891,7 @@ ElementTree Objects ...@@ -891,7 +891,7 @@ ElementTree Objects
Creates and returns a tree iterator for the root element. The iterator Creates and returns a tree iterator for the root element. The iterator
loops over all elements in this tree, in section order. *tag* is the tag loops over all elements in this tree, in section order. *tag* is the tag
to look for (default is to return all elements) to look for (default is to return all elements).
.. method:: iterfind(match, namespaces=None) .. method:: iterfind(match, namespaces=None)
......
...@@ -1310,7 +1310,7 @@ Basic customization ...@@ -1310,7 +1310,7 @@ Basic customization
object's :meth:`__hash__` must interoperate on builds of different bit object's :meth:`__hash__` must interoperate on builds of different bit
sizes, be sure to check the width on all supported builds. An easy way sizes, be sure to check the width on all supported builds. An easy way
to do this is with to do this is with
``python -c "import sys; print(sys.hash_info.width)"`` ``python -c "import sys; print(sys.hash_info.width)"``.
If a class does not define an :meth:`__eq__` method it should not define a If a class does not define an :meth:`__eq__` method it should not define a
:meth:`__hash__` operation either; if it defines :meth:`__eq__` but not :meth:`__hash__` operation either; if it defines :meth:`__eq__` but not
......
...@@ -371,7 +371,7 @@ the yield expression. It can be either set explicitly when raising ...@@ -371,7 +371,7 @@ the yield expression. It can be either set explicitly when raising
(by returning a value from the sub-generator). (by returning a value from the sub-generator).
.. versionchanged:: 3.3 .. versionchanged:: 3.3
Added ``yield from <expr>`` to delegate control flow to a subiterator Added ``yield from <expr>`` to delegate control flow to a subiterator.
The parentheses may be omitted when the yield expression is the sole expression The parentheses may be omitted when the yield expression is the sole expression
on the right hand side of an assignment statement. on the right hand side of an assignment statement.
......
...@@ -1367,6 +1367,7 @@ John Szakmeister ...@@ -1367,6 +1367,7 @@ John Szakmeister
Amir Szekely Amir Szekely
Arfrever Frehtes Taifersar Arahesis Arfrever Frehtes Taifersar Arahesis
Hideaki Takahashi Hideaki Takahashi
Takase Arihiro
Indra Talip Indra Talip
Neil Tallim Neil Tallim
Geoff Talvola Geoff Talvola
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment