mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
gh-101100: Fix sphinx warnings in Doc/library/locale.rst
(#114425)
* gh-101100: Fix sphinx warnings in `Doc/library/locale.rst` * Remove `/` from signatures
This commit is contained in:
parent
e14930ff63
commit
7d21cae964
2 changed files with 48 additions and 14 deletions
|
@ -18,7 +18,7 @@ know all the specifics of each country where the software is executed.
|
||||||
|
|
||||||
.. index:: pair: module; _locale
|
.. index:: pair: module; _locale
|
||||||
|
|
||||||
The :mod:`locale` module is implemented on top of the :mod:`_locale` module,
|
The :mod:`locale` module is implemented on top of the :mod:`!_locale` module,
|
||||||
which in turn uses an ANSI C locale implementation if available.
|
which in turn uses an ANSI C locale implementation if available.
|
||||||
|
|
||||||
The :mod:`locale` module defines the following exception and functions:
|
The :mod:`locale` module defines the following exception and functions:
|
||||||
|
@ -192,7 +192,13 @@ The :mod:`locale` module defines the following exception and functions:
|
||||||
Get a format string for :func:`time.strftime` to represent time in the am/pm
|
Get a format string for :func:`time.strftime` to represent time in the am/pm
|
||||||
format.
|
format.
|
||||||
|
|
||||||
.. data:: DAY_1 ... DAY_7
|
.. data:: DAY_1
|
||||||
|
DAY_2
|
||||||
|
DAY_3
|
||||||
|
DAY_4
|
||||||
|
DAY_5
|
||||||
|
DAY_6
|
||||||
|
DAY_7
|
||||||
|
|
||||||
Get the name of the n-th day of the week.
|
Get the name of the n-th day of the week.
|
||||||
|
|
||||||
|
@ -202,15 +208,43 @@ The :mod:`locale` module defines the following exception and functions:
|
||||||
international convention (ISO 8601) that Monday is the first day of the
|
international convention (ISO 8601) that Monday is the first day of the
|
||||||
week.
|
week.
|
||||||
|
|
||||||
.. data:: ABDAY_1 ... ABDAY_7
|
.. data:: ABDAY_1
|
||||||
|
ABDAY_2
|
||||||
|
ABDAY_3
|
||||||
|
ABDAY_4
|
||||||
|
ABDAY_5
|
||||||
|
ABDAY_6
|
||||||
|
ABDAY_7
|
||||||
|
|
||||||
Get the abbreviated name of the n-th day of the week.
|
Get the abbreviated name of the n-th day of the week.
|
||||||
|
|
||||||
.. data:: MON_1 ... MON_12
|
.. data:: MON_1
|
||||||
|
MON_2
|
||||||
|
MON_3
|
||||||
|
MON_4
|
||||||
|
MON_5
|
||||||
|
MON_6
|
||||||
|
MON_7
|
||||||
|
MON_8
|
||||||
|
MON_9
|
||||||
|
MON_10
|
||||||
|
MON_11
|
||||||
|
MON_12
|
||||||
|
|
||||||
Get the name of the n-th month.
|
Get the name of the n-th month.
|
||||||
|
|
||||||
.. data:: ABMON_1 ... ABMON_12
|
.. data:: ABMON_1
|
||||||
|
ABMON_2
|
||||||
|
ABMON_3
|
||||||
|
ABMON_4
|
||||||
|
ABMON_5
|
||||||
|
ABMON_6
|
||||||
|
ABMON_7
|
||||||
|
ABMON_8
|
||||||
|
ABMON_9
|
||||||
|
ABMON_10
|
||||||
|
ABMON_11
|
||||||
|
ABMON_12
|
||||||
|
|
||||||
Get the abbreviated name of the n-th month.
|
Get the abbreviated name of the n-th month.
|
||||||
|
|
||||||
|
@ -229,14 +263,14 @@ The :mod:`locale` module defines the following exception and functions:
|
||||||
|
|
||||||
.. data:: NOEXPR
|
.. data:: NOEXPR
|
||||||
|
|
||||||
Get a regular expression that can be used with the regex(3) function to
|
Get a regular expression that can be used with the ``regex(3)`` function to
|
||||||
recognize a negative response to a yes/no question.
|
recognize a negative response to a yes/no question.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
The regular expressions for :const:`YESEXPR` and
|
The regular expressions for :const:`YESEXPR` and
|
||||||
:const:`NOEXPR` use syntax suitable for the
|
:const:`NOEXPR` use syntax suitable for the
|
||||||
:c:func:`regex` function from the C library, which might
|
``regex`` function from the C library, which might
|
||||||
differ from the syntax used in :mod:`re`.
|
differ from the syntax used in :mod:`re`.
|
||||||
|
|
||||||
.. data:: CRNCYSTR
|
.. data:: CRNCYSTR
|
||||||
|
@ -581,9 +615,9 @@ the locale is ``C``).
|
||||||
|
|
||||||
When Python code uses the :mod:`locale` module to change the locale, this also
|
When Python code uses the :mod:`locale` module to change the locale, this also
|
||||||
affects the embedding application. If the embedding application doesn't want
|
affects the embedding application. If the embedding application doesn't want
|
||||||
this to happen, it should remove the :mod:`_locale` extension module (which does
|
this to happen, it should remove the :mod:`!_locale` extension module (which does
|
||||||
all the work) from the table of built-in modules in the :file:`config.c` file,
|
all the work) from the table of built-in modules in the :file:`config.c` file,
|
||||||
and make sure that the :mod:`_locale` module is not accessible as a shared
|
and make sure that the :mod:`!_locale` module is not accessible as a shared
|
||||||
library.
|
library.
|
||||||
|
|
||||||
|
|
||||||
|
@ -597,17 +631,18 @@ Access to message catalogs
|
||||||
.. function:: dcgettext(domain, msg, category)
|
.. function:: dcgettext(domain, msg, category)
|
||||||
.. function:: textdomain(domain)
|
.. function:: textdomain(domain)
|
||||||
.. function:: bindtextdomain(domain, dir)
|
.. function:: bindtextdomain(domain, dir)
|
||||||
|
.. function:: bind_textdomain_codeset(domain, codeset)
|
||||||
|
|
||||||
The locale module exposes the C library's gettext interface on systems that
|
The locale module exposes the C library's gettext interface on systems that
|
||||||
provide this interface. It consists of the functions :func:`!gettext`,
|
provide this interface. It consists of the functions :func:`gettext`,
|
||||||
:func:`!dgettext`, :func:`!dcgettext`, :func:`!textdomain`, :func:`!bindtextdomain`,
|
:func:`dgettext`, :func:`dcgettext`, :func:`textdomain`, :func:`bindtextdomain`,
|
||||||
and :func:`!bind_textdomain_codeset`. These are similar to the same functions in
|
and :func:`bind_textdomain_codeset`. These are similar to the same functions in
|
||||||
the :mod:`gettext` module, but use the C library's binary format for message
|
the :mod:`gettext` module, but use the C library's binary format for message
|
||||||
catalogs, and the C library's search algorithms for locating message catalogs.
|
catalogs, and the C library's search algorithms for locating message catalogs.
|
||||||
|
|
||||||
Python applications should normally find no need to invoke these functions, and
|
Python applications should normally find no need to invoke these functions, and
|
||||||
should use :mod:`gettext` instead. A known exception to this rule are
|
should use :mod:`gettext` instead. A known exception to this rule are
|
||||||
applications that link with additional C libraries which internally invoke
|
applications that link with additional C libraries which internally invoke
|
||||||
:c:func:`gettext` or :c:func:`dcgettext`. For these applications, it may be
|
C functions ``gettext`` or ``dcgettext``. For these applications, it may be
|
||||||
necessary to bind the text domain, so that the libraries can properly locate
|
necessary to bind the text domain, so that the libraries can properly locate
|
||||||
their message catalogs.
|
their message catalogs.
|
||||||
|
|
|
@ -50,7 +50,6 @@ Doc/library/functools.rst
|
||||||
Doc/library/http.cookiejar.rst
|
Doc/library/http.cookiejar.rst
|
||||||
Doc/library/http.server.rst
|
Doc/library/http.server.rst
|
||||||
Doc/library/importlib.rst
|
Doc/library/importlib.rst
|
||||||
Doc/library/locale.rst
|
|
||||||
Doc/library/logging.config.rst
|
Doc/library/logging.config.rst
|
||||||
Doc/library/logging.handlers.rst
|
Doc/library/logging.handlers.rst
|
||||||
Doc/library/lzma.rst
|
Doc/library/lzma.rst
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue