Terry Reedy wrote: >>At compile time (by which I mean when the Python bytecode is built) > > Compile time is when the def statement is executed
no, that's run time. "def" is an executable statement, just like "print", "for", assignments, "import", etc. the entire module is compiled (to bytecode) before any part of it is executed. the compiler handles "global" and "from __future__", everything else is done at runtime. </F> -- http://mail.python.org/mailman/listinfo/python-list