mirror of
https://github.com/python/cpython.git
synced 2025-11-01 02:38:53 +00:00
gh-89158: Add some REPL secondary prompt markers (#93073)
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.
This commit is contained in:
parent
9bc616cb4c
commit
88f0d0c1e8
1 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue