summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Doc/library/stat.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/stat.rst b/Doc/library/stat.rst
index c9c399e..a62d9da 100644
--- a/Doc/library/stat.rst
+++ b/Doc/library/stat.rst
@@ -84,7 +84,7 @@ Example::
for f in os.listdir(top):
pathname = os.path.join(top, f)
- mode = os.stat(pathname)[ST_MODE]
+ mode = os.stat(pathname).st_mode
if S_ISDIR(mode):
# It's a directory, recurse into it
walktree(pathname, callback)