pdora...@pas-de-pub-merci.mac.com (Pierre-Alain Dorange) writes: > Chris Angelico <ros...@gmail.com> wrote: > > > https://docs.python.org/3/library/functions.html#compile > > > > [Python code is] compiled. > > Using this function, the code is "compiled".
You have it backward: Python code is compiled. That's what the Python runtime requires. It often happens automatically, but it happens for all Python code that gets executed. What that function does is allow you to *separately* compile the Python code. > I do not think this function is often used and most python project > simply use the interpreter (which do a small translation into byte-code > to be faster and check syntax error before running interpretation). The “small translation into byte-code” *is* compilation. Don't make the mistake that the only product of “compile” is some CPU code; that is a foolishly narrow definition. (Good sigmonster, have a cookie.) -- \ “[I]t is impossible for anyone to begin to learn that which he | `\ thinks he already knows.” —Epictetus, _Discourses_ | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list