]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-33671 fix orphaned comment in shutil.copyfileobj (GH-27516)
authorAnthony Sottile <asottile@umich.edu>
Sat, 31 Jul 2021 19:15:45 +0000 (15:15 -0400)
committerGitHub <noreply@github.com>
Sat, 31 Jul 2021 19:15:45 +0000 (15:15 -0400)
Lib/shutil.py

index 2cb5ef848c278180a79ad226b19e8a17f6442622..273a7d2f4324a66f4bc8acbcffab49e51845a07a 100644 (file)
@@ -188,9 +188,9 @@ def _copyfileobj_readinto(fsrc, fdst, length=COPY_BUFSIZE):
 
 def copyfileobj(fsrc, fdst, length=0):
     """copy data from file-like object fsrc to file-like object fdst"""
-    # Localize variable access to minimize overhead.
     if not length:
         length = COPY_BUFSIZE
+    # Localize variable access to minimize overhead.
     fsrc_read = fsrc.read
     fdst_write = fdst.write
     while True: