From 487600c49732468504600afb027d56d7e38a8b8d Mon Sep 17 00:00:00 2001 From: Carol Willing Date: Wed, 21 Feb 2024 15:57:25 -0800 Subject: [PATCH 1/2] Fix alpha sort for glossary item --- Doc/glossary.rst | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Doc/glossary.rst b/Doc/glossary.rst index f656e32514c717..e8b81efca3b6fc 100644 --- a/Doc/glossary.rst +++ b/Doc/glossary.rst @@ -727,18 +727,6 @@ Glossary thread removes *key* from *mapping* after the test, but before the lookup. This issue can be solved with locks or by using the EAFP approach. - locale encoding - On Unix, it is the encoding of the LC_CTYPE locale. It can be set with - :func:`locale.setlocale(locale.LC_CTYPE, new_locale) `. - - On Windows, it is the ANSI code page (ex: ``"cp1252"``). - - On Android and VxWorks, Python uses ``"utf-8"`` as the locale encoding. - - ``locale.getencoding()`` can be used to get the locale encoding. - - See also the :term:`filesystem encoding and error handler`. - list A built-in Python :term:`sequence`. Despite its name it is more akin to an array in other languages than to a linked list since access to @@ -758,6 +746,18 @@ Glossary :term:`finder`. See :pep:`302` for details and :class:`importlib.abc.Loader` for an :term:`abstract base class`. + locale encoding + On Unix, it is the encoding of the LC_CTYPE locale. It can be set with + :func:`locale.setlocale(locale.LC_CTYPE, new_locale) `. + + On Windows, it is the ANSI code page (ex: ``"cp1252"``). + + On Android and VxWorks, Python uses ``"utf-8"`` as the locale encoding. + + ``locale.getencoding()`` can be used to get the locale encoding. + + See also the :term:`filesystem encoding and error handler`. + magic method .. index:: pair: magic; method From 840979cfeb6f2c6c212f83dbf6784604b79be13d Mon Sep 17 00:00:00 2001 From: Carol Willing Date: Wed, 21 Feb 2024 17:17:56 -0800 Subject: [PATCH 2/2] Update Doc/glossary.rst Co-authored-by: C.A.M. Gerlach --- Doc/glossary.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/glossary.rst b/Doc/glossary.rst index e8b81efca3b6fc..167ffa9d06568d 100644 --- a/Doc/glossary.rst +++ b/Doc/glossary.rst @@ -754,7 +754,7 @@ Glossary On Android and VxWorks, Python uses ``"utf-8"`` as the locale encoding. - ``locale.getencoding()`` can be used to get the locale encoding. + :func:`locale.getencoding` can be used to get the locale encoding. See also the :term:`filesystem encoding and error handler`.