mirror of
https://github.com/python/cpython.git
synced 2025-07-31 07:04:42 +00:00
fix issue2707 - os.walk docstring example correctness typo.
This commit is contained in:
parent
e3dcb01bfc
commit
8e4997390c
1 changed files with 2 additions and 1 deletions
|
@ -267,8 +267,9 @@ def walk(top, topdown=True, onerror=None, followlinks=False):
|
|||
|
||||
Example:
|
||||
|
||||
import os
|
||||
from os.path import join, getsize
|
||||
for root, dirs, files in walk('python/Lib/email'):
|
||||
for root, dirs, files in os.walk('python/Lib/email'):
|
||||
print root, "consumes",
|
||||
print sum([getsize(join(root, name)) for name in files]),
|
||||
print "bytes in", len(files), "non-directory files"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue