On Sun, Jul 15, 2012 at 6:32 PM, Steven D'Aprano
<steve+comp.lang.pyt...@pearwood.info> wrote:
> At compile time, Python parses the source code and turns it into byte-
> code. Class and function definitions are executed at run time, the same
> as any other statement.

Between the parse step and the 'def' execution, a code object is
created. When you call it, that code object already exists. Nothing
else really matters, unless there's a bug in the Python optimizer or
something weird like that. The nearest thing Python _has_ to a
"compile time" is the execution of def.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to