O'Reilly logo
  • Chris Kang thinks this is interesting:

Byte code is instead stored in files in a subdirectory named __pycache__, which Python creates if needed, and which is located in the directory containing the corresponding source files. This helps avoid clutter in your source directories by segregating the byte code files in their own directory. In addition, although byte code files still get the .pyc extension as before, they are given more descriptive names that include text identifying the version of Python that created them (e.g., module.cpython-32.pyc). This avoids contention and re...

From

Cover of Learning Python, 5th Edition

Note

The subdirectory exists where the source file is located. The directory name is literally named pycache