Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #96029

Re: Python handles globals badly.

References <c3363$547e74fe$5419aafe$24179@news.ziggo.nl> <58e0d1b5-a7ca-4811-9926-fba1b7ede83f@googlegroups.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date 2015-09-04 13:48 -0600
Subject Re: Python handles globals badly.
Newsgroups comp.lang.python
Message-ID <mailman.146.1441396163.8327.python-list@python.org> (permalink)

Show all headers | View raw


On Fri, Sep 4, 2015 at 1:11 PM,  <tdev@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.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Python handles globals badly. tdev@freenet.de - 2015-09-04 12:11 -0700
  Re: Python handles globals badly. Ian Kelly <ian.g.kelly@gmail.com> - 2015-09-04 13:48 -0600
  Re: Python handles globals badly. Ian Kelly <ian.g.kelly@gmail.com> - 2015-09-04 13:52 -0600
  Re: Python handles globals badly. Chris Angelico <rosuav@gmail.com> - 2015-09-05 10:27 +1000
  Re: Python handles globals badly. Michael Torrie <torriem@gmail.com> - 2015-09-04 19:42 -0600
  Re: Python handles globals badly. Chris Angelico <rosuav@gmail.com> - 2015-09-05 11:54 +1000
    Program in or into (was Python handles globals badly) Rustom Mody <rustompmody@gmail.com> - 2015-09-04 20:18 -0700
      Re: Program in or into (was Python handles globals badly) Chris Angelico <rosuav@gmail.com> - 2015-09-05 13:31 +1000
      Re: Program in or into (was Python handles globals badly) Steven D'Aprano <steve@pearwood.info> - 2015-09-06 12:35 +1000
        Re: Program in or into (was Python handles globals badly) MRAB <python@mrabarnett.plus.com> - 2015-09-06 03:54 +0100
        Re: Program in or into (was Python handles globals badly) Rustom Mody <rustompmody@gmail.com> - 2015-09-05 21:35 -0700
        Re: Program in or into (was Python handles globals badly) random832@fastmail.us - 2015-09-06 01:26 -0400
          Re: Program in or into (was Python handles globals badly) wxjmfauth@gmail.com - 2015-09-06 00:42 -0700
        Re: Program in or into (was Python handles globals badly) Ian Kelly <ian.g.kelly@gmail.com> - 2015-09-06 18:19 -0600

csiph-web