]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix missing spaces in os.walk example (GH-29918)
author辰冢 <49506152+BruceLee569@users.noreply.github.com>
Fri, 18 Feb 2022 04:10:33 +0000 (12:10 +0800)
committerGitHub <noreply@github.com>
Fri, 18 Feb 2022 04:10:33 +0000 (23:10 -0500)
Lib/os.py

index ab7ef3c17798b9403b6ef67d24bb3e8ebd899ce5..4626d1fc4a9b54e7ca458d53953bbfe913174da6 100644 (file)
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -331,8 +331,8 @@ def walk(top, topdown=True, onerror=None, followlinks=False):
     import os
     from os.path import join, getsize
     for root, dirs, files in os.walk('python/Lib/email'):
-        print(root, "consumes", end="")
-        print(sum(getsize(join(root, name)) for name in files), end="")
+        print(root, "consumes ")
+        print(sum(getsize(join(root, name)) for name in files), end=" ")
         print("bytes in", len(files), "non-directory files")
         if 'CVS' in dirs:
             dirs.remove('CVS')  # don't visit CVS directories