Quoting from the link PEP338
Proposed Semantics
The semantics proposed are fairly simple: if -m is
used to execute a module the PEP 302 import mechanisms are used to
locate the module and retrieve its compiled code, before executing the
module in accordance with the semantics for a top-level module.
Now let us refer to the documentation of imp (the import mechanism) and determine the different types of modules that can be imported
imp.get_suffixes()
imp.get_suffixes() Return a list of 3-element tuples, each describing
a particular type of module. Each triple has the form (suffix, mode,
type), where suffix is a string to be appended to the module name to
form the filename to search for, mode is the mode string to pass to
the built-in open() function to open the file (this can be 'r' for
text files or 'rb' for binary files), and type is the file type,
which has one of the values PY_SOURCE, PY_COMPILED, or C_EXTENSION,
described below.
and subsequently it explains what the different types are
imp.PY_SOURCE The module was found as a source file.
imp.PY_COMPILED The module was found as a compiled code object file.
imp.C_EXTENSION The module was found as dynamically loadable shared
library.
So, the types mentioned in PEP 338 are nothing but the types of modules that can be imported and of these only PY_SOURCE or PY_COMPILED are the only two types out of the above three the command line is effectively reinterpreted from python -m to python .