[Python-checkins] r62757 - python/branches/release25-maint/Lib/os.py

gregory.p.smith python-checkins at python.org
Tue May 6 09:06:45 CEST 2008


Author: gregory.p.smith
Date: Tue May  6 09:06:44 2008
New Revision: 62757

Log:
Fix os.walk docstring example - issue2707


Modified:
   python/branches/release25-maint/Lib/os.py

Modified: python/branches/release25-maint/Lib/os.py
==============================================================================
--- python/branches/release25-maint/Lib/os.py	(original)
+++ python/branches/release25-maint/Lib/os.py	Tue May  6 09:06:44 2008
@@ -263,8 +263,9 @@
 
     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"


More information about the Python-checkins mailing list