mirror of
https://github.com/python/cpython.git
synced 2025-09-29 19:56:59 +00:00
Replace broken example code with correct simpler code. (GH-25162) (GH-25166)
This commit is contained in:
parent
f12ae0b31a
commit
cbfa09b70b
1 changed files with 2 additions and 2 deletions
|
@ -115,9 +115,9 @@ different, updated answers each time::
|
||||||
20
|
20
|
||||||
>>> g.size # The games directory has three files
|
>>> g.size # The games directory has three files
|
||||||
3
|
3
|
||||||
>>> open('games/newfile').close() # Add a fourth file to the directory
|
>>> os.remove('games/chess') # Delete a game
|
||||||
>>> g.size # File count is automatically updated
|
>>> g.size # File count is automatically updated
|
||||||
4
|
2
|
||||||
|
|
||||||
Besides showing how descriptors can run computations, this example also
|
Besides showing how descriptors can run computations, this example also
|
||||||
reveals the purpose of the parameters to :meth:`__get__`. The *self*
|
reveals the purpose of the parameters to :meth:`__get__`. The *self*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue