File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -83,20 +83,24 @@ byte-code cache files in the directory containing the source code.
83
83
84
84
.. attribute :: TIMESTAMP
85
85
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
88
88
determine if the pyc needs to be regenerated.
89
89
90
90
.. attribute :: CHECKED_HASH
91
91
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
94
94
regenerated.
95
95
96
96
.. attribute :: UNCHECKED_HASH
97
97
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.
100
104
101
105
102
106
.. function :: main(args=None)
You can’t perform that action at this time.
0 commit comments