From 073e909795ef212f70bd8757f96efed0c855bc35 Mon Sep 17 00:00:00 2001 From: Skip Montanaro Date: Mon, 29 Jan 2024 11:29:18 -0600 Subject: [PATCH 1/4] Update glossary.rst Given context, I don't think any of these reference problems need to actually be references. --- Doc/glossary.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/glossary.rst b/Doc/glossary.rst index 098bfffb104ef6..15ddc50aba23b0 100644 --- a/Doc/glossary.rst +++ b/Doc/glossary.rst @@ -341,7 +341,7 @@ Glossary docstring A string literal which appears as the first expression in a class, function or module. While ignored when the suite is executed, it is - recognized by the compiler and put into the :attr:`__doc__` attribute + recognized by the compiler and put into the :attr:`!__doc__` attribute of the enclosing class, function or module. Since it is available via introspection, it is the canonical place for documentation of the object. @@ -754,7 +754,7 @@ Glossary loader An object that loads a module. It must define a method named - :meth:`load_module`. A loader is typically returned by a + :meth:`!load_module`. A loader is typically returned by a :term:`finder`. See :pep:`302` for details and :class:`importlib.abc.Loader` for an :term:`abstract base class`. @@ -1104,7 +1104,7 @@ Glossary The :class:`collections.abc.Sequence` abstract base class defines a much richer interface that goes beyond just :meth:`~object.__getitem__` and :meth:`~object.__len__`, adding - :meth:`count`, :meth:`index`, :meth:`~object.__contains__`, and + :meth:`!count`, :meth:`!index`, :meth:`~object.__contains__`, and :meth:`~object.__reversed__`. Types that implement this expanded interface can be registered explicitly using :func:`~abc.ABCMeta.register`. From 513aa8330493b9c36e28dbcb55e7396484e67bd5 Mon Sep 17 00:00:00 2001 From: Skip Montanaro Date: Mon, 29 Jan 2024 15:56:26 -0600 Subject: [PATCH 2/4] @AlexWaygood - does this look okay? --- Doc/glossary.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Doc/glossary.rst b/Doc/glossary.rst index 15ddc50aba23b0..94f5ddab5b763b 100644 --- a/Doc/glossary.rst +++ b/Doc/glossary.rst @@ -1103,10 +1103,10 @@ Glossary The :class:`collections.abc.Sequence` abstract base class defines a much richer interface that goes beyond just - :meth:`~object.__getitem__` and :meth:`~object.__len__`, adding - :meth:`!count`, :meth:`!index`, :meth:`~object.__contains__`, and - :meth:`~object.__reversed__`. Types that implement this expanded - interface can be registered explicitly using + :meth:`~object.__getitem__` and :meth:`~object.__len__`. + :ref:`Common Sequence Operations ` + provides a list common to most sequence types. + Types which implement this expanded interface can be registered explicitly using :func:`~abc.ABCMeta.register`. set comprehension From f516b3b85535beecb82e2f0d253804f83c8875c5 Mon Sep 17 00:00:00 2001 From: Skip Montanaro Date: Thu, 1 Feb 2024 16:22:09 -0600 Subject: [PATCH 3/4] revert, per Alex Waygood --- Doc/glossary.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/glossary.rst b/Doc/glossary.rst index 94f5ddab5b763b..ffa4bd1c9574e7 100644 --- a/Doc/glossary.rst +++ b/Doc/glossary.rst @@ -754,7 +754,7 @@ Glossary loader An object that loads a module. It must define a method named - :meth:`!load_module`. A loader is typically returned by a + :meth:`load_module`. A loader is typically returned by a :term:`finder`. See :pep:`302` for details and :class:`importlib.abc.Loader` for an :term:`abstract base class`. From fb37d09e463e357e4bd3322919207f72c5266fa4 Mon Sep 17 00:00:00 2001 From: Skip Montanaro Date: Sat, 3 Feb 2024 12:37:56 -0600 Subject: [PATCH 4/4] Update Doc/glossary.rst Co-authored-by: Alex Waygood --- Doc/glossary.rst | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Doc/glossary.rst b/Doc/glossary.rst index ffa4bd1c9574e7..f656e32514c717 100644 --- a/Doc/glossary.rst +++ b/Doc/glossary.rst @@ -1103,11 +1103,13 @@ Glossary The :class:`collections.abc.Sequence` abstract base class defines a much richer interface that goes beyond just - :meth:`~object.__getitem__` and :meth:`~object.__len__`. - :ref:`Common Sequence Operations ` - provides a list common to most sequence types. - Types which implement this expanded interface can be registered explicitly using - :func:`~abc.ABCMeta.register`. + :meth:`~object.__getitem__` and :meth:`~object.__len__`, adding + :meth:`!count`, :meth:`!index`, :meth:`~object.__contains__`, and + :meth:`~object.__reversed__`. Types that implement this expanded + interface can be registered explicitly using + :func:`~abc.ABCMeta.register`. For more documentation on sequence + methods generally, see + :ref:`Common Sequence Operations `. set comprehension A compact way to process all or part of the elements in an iterable and