On Tue, Sep 10, 2013 at 11:10 AM, Bibhas <m...@bibhas.in> wrote: > > > Anand Chitipothu <anandol...@gmail.com> wrote: > >On Tue, Sep 10, 2013 at 10:57 AM, Shabda Raaj <sha...@agiliq.com> > >wrote: > > > >> > A variable is either local or global. It is decided at the compile > >time. > >> > >> Erm, compile? > >> > > > >well, you may call it module/script load time. But python compiles the > >code > >and generates bytecode before executing it. > > > >$ file a.pyc > >a.pyc: python 2.6 byte-compiled > > > > Only the scripts that have been imported somewhere. Right? >
No, every source file is compiled before execution. For modules, the compiled output is cached as .pyc file to avoid compiling it on every use. Anand _______________________________________________ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers