Skip to content

Commit f43a6c0

Browse files
committed
massage PycInvalidationMode docs
1 parent 84da77c commit f43a6c0

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

Doc/library/py_compile.rst

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,20 +83,24 @@ byte-code cache files in the directory containing the source code.
8383

8484
.. attribute:: TIMESTAMP
8585

86-
The pyc should include the timestamp and size of the source file, which
87-
Python will compare against the metadata of the source file at runtime to
86+
The pyc includes the timestamp and size of the source file, which Python
87+
will compare against the metadata of the source file at runtime to
8888
determine if the pyc needs to be regenerated.
8989

9090
.. attribute:: CHECKED_HASH
9191

92-
The pyc should include a hash of the source file which Python will compare
93-
against the source at runtime to determine if the pyc needs to be
92+
The pyc includes a hash of the source file content, which Python will
93+
compare against the source at runtime to determine if the pyc needs to be
9494
regenerated.
9595

9696
.. attribute:: UNCHECKED_HASH
9797

98-
The pyc should include a hash of the source file but Python should not
99-
validate it against the source file at runtime.
98+
Like :attr:`CHECKED_HASH`, the pyc includes a hash of the source file
99+
content. However, Python will at runtime assume the pyc is up to date and
100+
not validate the pyc against the source file at all.
101+
102+
This option is useful when the pycs are kept up to date by some system
103+
external to Python like a build system.
100104

101105

102106
.. function:: main(args=None)

0 commit comments

Comments
 (0)