summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHynek Schlawack <hs@ox.cx>2012-06-24 14:11:08 (GMT)
committerHynek Schlawack <hs@ox.cx>2012-06-24 14:11:08 (GMT)
commit1729b8f45beeb57f2fdc85fae64a44cddda2f725 (patch)
tree3f8ee7bfda44a5c7397fde2e263bdf058d36d6de
parentae64b4d8e252974121f5233507736986695fca2b (diff)
downloadcpython-1729b8f45beeb57f2fdc85fae64a44cddda2f725.zip
cpython-1729b8f45beeb57f2fdc85fae64a44cddda2f725.tar.gz
cpython-1729b8f45beeb57f2fdc85fae64a44cddda2f725.tar.bz2
Fix doc of os.fwalk: example used now non-existing os.fstatat()
-rw-r--r--Doc/library/os.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index d0e2532..f38b152 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -2252,7 +2252,7 @@ features:
import os
for root, dirs, files, rootfd in os.fwalk('python/Lib/email'):
print(root, "consumes", end="")
- print(sum([os.fstatat(rootfd, name).st_size for name in files]),
+ print(sum([os.stat(name, dir_fd=rootfd).st_size for name in files]),
end="")
print("bytes in", len(files), "non-directory files")
if 'CVS' in dirs: