@@ -3547,16 +3547,16 @@ features:
35473547
35483548 This example displays the number of bytes taken by non-directory files in each
35493549 directory under the starting directory, except that it doesn't look under any
3550- CVS subdirectory::
3550+ `` __pycache__ `` subdirectory::
35513551
35523552 import os
35533553 from os.path import join, getsize
3554- for root, dirs, files in os.walk('python/Lib/email '):
3554+ for root, dirs, files in os.walk('python/Lib/xml '):
35553555 print(root, "consumes", end=" ")
35563556 print(sum(getsize(join(root, name)) for name in files), end=" ")
35573557 print("bytes in", len(files), "non-directory files")
3558- if 'CVS ' in dirs:
3559- dirs.remove('CVS ') # don't visit CVS directories
3558+ if '__pycache__ ' in dirs:
3559+ dirs.remove('__pycache__ ') # don't visit __pycache__ directories
35603560
35613561 In the next example (simple implementation of :func: `shutil.rmtree `),
35623562 walking the tree bottom-up is essential, :func: `rmdir ` doesn't allow
@@ -3609,16 +3609,16 @@ features:
36093609
36103610 This example displays the number of bytes taken by non-directory files in each
36113611 directory under the starting directory, except that it doesn't look under any
3612- CVS subdirectory::
3612+ `` __pycache__ `` subdirectory::
36133613
36143614 import os
3615- for root, dirs, files, rootfd in os.fwalk('python/Lib/email '):
3615+ for root, dirs, files, rootfd in os.fwalk('python/Lib/xml '):
36163616 print(root, "consumes", end="")
36173617 print(sum([os.stat(name, dir_fd=rootfd).st_size for name in files]),
36183618 end="")
36193619 print("bytes in", len(files), "non-directory files")
3620- if 'CVS ' in dirs:
3621- dirs.remove('CVS ') # don't visit CVS directories
3620+ if '__pycache__ ' in dirs:
3621+ dirs.remove('__pycache__ ') # don't visit __pycache__ directories
36223622
36233623 In the next example, walking the tree bottom-up is essential:
36243624 :func: `rmdir ` doesn't allow deleting a directory before the directory is
0 commit comments