]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Replace broken example code with correct simpler code. (GH-25162) (GH-25166)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 3 Apr 2021 20:42:43 +0000 (13:42 -0700)
committerGitHub <noreply@github.com>
Sat, 3 Apr 2021 20:42:43 +0000 (13:42 -0700)
Doc/howto/descriptor.rst

index 0ddf1239ed2980d7674e9d2a6f5a4dff238be439..93dd35441f41c2c19682bb36156da888bbf3c342 100644 (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*