Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1729b8f

Browse files
committed
Fix doc of os.fwalk: example used now non-existing os.fstatat()
1 parent ae64b4d commit 1729b8f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Doc/library/os.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2252,7 +2252,7 @@ features:
22522252
import os
22532253
for root, dirs, files, rootfd in os.fwalk('python/Lib/email'):
22542254
print(root, "consumes", end="")
2255-
print(sum([os.fstatat(rootfd, name).st_size for name in files]),
2255+
print(sum([os.stat(name, dir_fd=rootfd).st_size for name in files]),
22562256
end="")
22572257
print("bytes in", len(files), "non-directory files")
22582258
if 'CVS' in dirs:

0 commit comments

Comments
 (0)