mirror of
https://github.com/python/cpython.git
synced 2025-11-12 07:02:33 +00:00
Fix doc of os.fwalk: example used now non-existing os.fstatat()
This commit is contained in:
parent
ae64b4d8e2
commit
1729b8f45b
1 changed files with 1 additions and 1 deletions
|
|
@ -2252,7 +2252,7 @@ features:
|
||||||
import os
|
import os
|
||||||
for root, dirs, files, rootfd in os.fwalk('python/Lib/email'):
|
for root, dirs, files, rootfd in os.fwalk('python/Lib/email'):
|
||||||
print(root, "consumes", end="")
|
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="")
|
end="")
|
||||||
print("bytes in", len(files), "non-directory files")
|
print("bytes in", len(files), "non-directory files")
|
||||||
if 'CVS' in dirs:
|
if 'CVS' in dirs:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue