Fix os.walk docstring example - issue2707

This commit is contained in:
Gregory P. Smith 2008-05-06 07:06:44 +00:00
parent 9e6649f8ee
commit fbc190af4f
1 changed files with 2 additions and 1 deletions

View File

@ -263,8 +263,9 @@ def walk(top, topdown=True, onerror=None):
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"