Replace broken example code with correct simpler code. (GH-25162) (GH-25166)

This commit is contained in:
Miss Islington (bot) 2021-04-03 13:42:43 -07:00 committed by GitHub
parent f12ae0b31a
commit cbfa09b70b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -115,9 +115,9 @@ different, updated answers each time::
20
>>> g.size # The games directory has three files
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
4
2
Besides showing how descriptors can run computations, this example also
reveals the purpose of the parameters to :meth:`__get__`. The *self*