]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-89158: Add some REPL secondary prompt markers (#93073)
authorNicolas Haller <nicolas@haller.im>
Mon, 23 May 2022 04:58:07 +0000 (00:58 -0400)
committerGitHub <noreply@github.com>
Mon, 23 May 2022 04:58:07 +0000 (00:58 -0400)
This fixes an issue on tutorial/classes.rst section 9.4 where the example "class Warehouse"
was truncated when pressing the >>> button to hide the prompts and output.

Doc/tutorial/classes.rst

index f44cb0b4e905a9df449107b31567f9e9fb0905ba..58b06eb5f2535671408e45153015b93d3cb859f9 100644 (file)
@@ -479,9 +479,9 @@ If the same attribute name occurs in both an instance and in a class,
 then attribute lookup prioritizes the instance::
 
     >>> class Warehouse:
-            purpose = 'storage'
-            region = 'west'
-
+    ...    purpose = 'storage'
+    ...    region = 'west'
+    ...
     >>> w1 = Warehouse()
     >>> print(w1.purpose, w1.region)
     storage west