]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-92120: The docstring of enum.Enum is invalid in reST (GH-92122)
authorTakeshi KOMIYA <i.tkomiya@gmail.com>
Thu, 8 Dec 2022 02:24:52 +0000 (11:24 +0900)
committerGitHub <noreply@github.com>
Thu, 8 Dec 2022 02:24:52 +0000 (18:24 -0800)
Closes #92120

Lib/enum.py
Misc/NEWS.d/next/Library/2022-05-06-01-53-34.gh-issue-92122.96Lf2p.rst [new file with mode: 0644]

index f07b821f1a606adf311c1a21096b54784f71ffb7..b2f7b9f8d4ad1356c5899379cca49c5bea085c42 100644 (file)
@@ -1054,20 +1054,20 @@ class Enum(metaclass=EnumType):
 
     Access them by:
 
-    - attribute access::
+    - attribute access:
 
-    >>> Color.RED
-    <Color.RED: 1>
+      >>> Color.RED
+      <Color.RED: 1>
 
     - value lookup:
 
-    >>> Color(1)
-    <Color.RED: 1>
+      >>> Color(1)
+      <Color.RED: 1>
 
     - name lookup:
 
-    >>> Color['RED']
-    <Color.RED: 1>
+      >>> Color['RED']
+      <Color.RED: 1>
 
     Enumerations can be iterated over, and know how many members they have:
 
diff --git a/Misc/NEWS.d/next/Library/2022-05-06-01-53-34.gh-issue-92122.96Lf2p.rst b/Misc/NEWS.d/next/Library/2022-05-06-01-53-34.gh-issue-92122.96Lf2p.rst
new file mode 100644 (file)
index 0000000..d585535
--- /dev/null
@@ -0,0 +1 @@
+Fix reStructuredText syntax errors in docstrings in the :mod:`enum` module.