An idiom for code generation with exec
tjreedy at udel.edu
Tue Jun 24 07:40:03 CEST 2008
> And while we're on the topic of what compilation means in Python,
It depends on the implementation.
> not sure I fully understand the difference between compiled (.pyc)
> code and exec-ed code. Is the exec-ed code turned to bytecode too,
> i.e. it will be as efficient as compile-d code ?
CPython always compiles to bytecode before executing. There is no
alternative execution path.
More information about the Python-list