Python handles globals badly.
Ian Kelly
ian.g.kelly at gmail.com
Fri Sep 4 15:48:35 EDT 2015
On Fri, Sep 4, 2015 at 1:11 PM, <tdev at freenet.de> wrote:
> 6- "include" script statement (extending namespace to another script, like PHP)
def include(filename):
exec(open(filename).read())
> Last but not least:
> Why does javascript, as sripting language too, need not such things like
> a keyword "global". It also very powerful language with dynamic binding, OO, ...
I thought you didn't want to talk about comparisons to other languages. :-P
Javascript uses the same stupid system that Lua does, where
*everything* is automatically global/nonlocal unless you specifically
declare it as local.
More information about the Python-list
mailing list