[Python-checkins] Fix missing spaces in os.walk example (GH-29918)

terryjreedy webhook-mailer at python.org
Thu Feb 17 23:10:38 EST 2022


https://github.com/python/cpython/commit/2a38e1ab65cb28af3babda17f6ad3f8e514a7455
commit: 2a38e1ab65cb28af3babda17f6ad3f8e514a7455
branch: main
author: 辰冢 <49506152+BruceLee569 at users.noreply.github.com>
committer: terryjreedy <tjreedy at udel.edu>
date: 2022-02-17T23:10:33-05:00
summary:

Fix missing spaces in os.walk example (GH-29918)

files:
M Lib/os.py

diff --git a/Lib/os.py b/Lib/os.py
index ab7ef3c17798b..4626d1fc4a9b5 100644
--- 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



More information about the Python-checkins mailing list