PyDocs

Nav

Python Language Services

PycInvalidationMode

py_compile

class · Added in 3.7 (source)
  • PycInvalidationMode(*values)
An enumeration of possible methods the interpreter can use to determine whether a bytecode file is up to date with a source file. The .pyc file indicates the desired invalidation mode in its header. See Cached bytecode invalidation for more information on how Python invalidates .pyc files at runtime.
Members of PycInvalidationMode

c

CHECKED_HASH
The .pyc file includes a hash of the source file content, which Python will compare against the source at runtime to determine if the .pyc file needs to be regenerated.

t

TIMESTAMP
The .pyc file includes the timestamp and size of the source file, which Python will compare against the metadata of the source file at runtime to determine if the .pyc file needs to be regenerated.

u

UNCHECKED_HASH
Like CHECKED_HASH, the .pyc file includes a hash of the source file content.
0 Examples
No examples for py_compile/PycInvalidationMode.
See Also
No see-alsos for py_compile/PycInvalidationMode
0 Notes
No notes for PycInvalidationMode