mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
Remove duplicate words in docs. (GH-26167)
This commit is contained in:
parent
2f47d8dcc7
commit
b06ed1d883
6 changed files with 9 additions and 9 deletions
|
@ -712,7 +712,7 @@ Glossary
|
||||||
On Unix, it is the encoding of the LC_CTYPE locale. It can be set with
|
On Unix, it is the encoding of the LC_CTYPE locale. It can be set with
|
||||||
``locale.setlocale(locale.LC_CTYPE, new_locale)``.
|
``locale.setlocale(locale.LC_CTYPE, new_locale)``.
|
||||||
|
|
||||||
On Windows, it is is the ANSI code page (ex: ``cp1252``).
|
On Windows, it is the ANSI code page (ex: ``cp1252``).
|
||||||
|
|
||||||
``locale.getpreferredencoding(False)`` can be used to get the locale
|
``locale.getpreferredencoding(False)`` can be used to get the locale
|
||||||
encoding.
|
encoding.
|
||||||
|
|
|
@ -597,8 +597,8 @@ Utilites and Decorators
|
||||||
|
|
||||||
A :keyword:`class` decorator specifically for enumerations. It replaces the
|
A :keyword:`class` decorator specifically for enumerations. It replaces the
|
||||||
:meth:`__repr__` method with one that shows *module_name*.*member_name*. It
|
:meth:`__repr__` method with one that shows *module_name*.*member_name*. It
|
||||||
also injects the members, and their aliases, into the the global namespace
|
also injects the members, and their aliases, into the global namespace they
|
||||||
they were defined in.
|
were defined in.
|
||||||
|
|
||||||
.. versionadded:: 3.10
|
.. versionadded:: 3.10
|
||||||
|
|
||||||
|
|
|
@ -205,7 +205,7 @@ The two following opening hooks are provided by this module:
|
||||||
modules. If the filename extension is not ``'.gz'`` or ``'.bz2'``, the file is
|
modules. If the filename extension is not ``'.gz'`` or ``'.bz2'``, the file is
|
||||||
opened normally (ie, using :func:`open` without any decompression).
|
opened normally (ie, using :func:`open` without any decompression).
|
||||||
|
|
||||||
The *encoding* and *errors* values are passed to to :class:`io.TextIOWrapper`
|
The *encoding* and *errors* values are passed to :class:`io.TextIOWrapper`
|
||||||
for compressed files and open for normal files.
|
for compressed files and open for normal files.
|
||||||
|
|
||||||
Usage example: ``fi = fileinput.FileInput(openhook=fileinput.hook_compressed, encoding="utf-8")``
|
Usage example: ``fi = fileinput.FileInput(openhook=fileinput.hook_compressed, encoding="utf-8")``
|
||||||
|
|
|
@ -278,8 +278,8 @@ Standard names are defined for the following types:
|
||||||
|
|
||||||
.. attribute:: __spec__
|
.. attribute:: __spec__
|
||||||
|
|
||||||
A record of the the module's import-system-related state. Expected to be
|
A record of the module's import-system-related state. Expected to be an
|
||||||
an instance of :class:`importlib.machinery.ModuleSpec`.
|
instance of :class:`importlib.machinery.ModuleSpec`.
|
||||||
|
|
||||||
.. versionadded:: 3.4
|
.. versionadded:: 3.4
|
||||||
|
|
||||||
|
|
|
@ -328,8 +328,8 @@ the *new_callable* argument to :func:`patch`.
|
||||||
|
|
||||||
.. method:: assert_called_once_with(*args, **kwargs)
|
.. method:: assert_called_once_with(*args, **kwargs)
|
||||||
|
|
||||||
Assert that the mock was called exactly once and that that call was
|
Assert that the mock was called exactly once and that call was with the
|
||||||
with the specified arguments.
|
specified arguments.
|
||||||
|
|
||||||
>>> mock = Mock(return_value=None)
|
>>> mock = Mock(return_value=None)
|
||||||
>>> mock('foo', bar='baz')
|
>>> mock('foo', bar='baz')
|
||||||
|
|
|
@ -1567,7 +1567,7 @@ Deprecated
|
||||||
Python 3.12. Use :meth:`pathlib.Path.hardlink_to` instead.
|
Python 3.12. Use :meth:`pathlib.Path.hardlink_to` instead.
|
||||||
(Contributed by Barney Gale in :issue:`39950`.)
|
(Contributed by Barney Gale in :issue:`39950`.)
|
||||||
|
|
||||||
* ``cgi.log()`` is deprecated and slated for for removal in Python 3.12.
|
* ``cgi.log()`` is deprecated and slated for removal in Python 3.12.
|
||||||
(Contributed by Inada Naoki in :issue:`41139`.)
|
(Contributed by Inada Naoki in :issue:`41139`.)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue