[BangPypers] Python "Wat"s
Anand Chitipothu
anandology at gmail.com
Tue Sep 10 08:30:51 CEST 2013
On Tue, Sep 10, 2013 at 11:10 AM, Bibhas <me at bibhas.in> wrote:
>
>
> Anand Chitipothu <anandology at gmail.com> wrote:
> >On Tue, Sep 10, 2013 at 10:57 AM, Shabda Raaj <shabda at 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
More information about the BangPypers
mailing list