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


Groups > comp.lang.python > #110271

Re: the global keyword:

From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Subject Re: the global keyword:
Date 2016-06-22 08:32 +1000
Message-ID <mailman.22.1466548352.11516.python-list@python.org> (permalink)
References (2 earlier) <646e9ff9-b5a1-4403-b79a-694397e34b0b@googlegroups.com> <1466529321.3842871.644317377.08527069@webmail.messagingengine.com> <mailman.10.1466529325.11516.python-list@python.org> <195658b2-e1b2-4c91-8ff8-bd58379e700f@googlegroups.com> <CAPTjJmpTvinOn0+087LVFTtPNA0SWo8cwHwHVUqHtk2EHYhHrw@mail.gmail.com>

Show all headers | View raw


On Wed, Jun 22, 2016 at 8:20 AM, Rick Johnson
<rantingrickjohnson@gmail.com> wrote:
> Then one could have added module-level symbols without all
> the semantic hubbub.
>
>     MSFL.foo = 0
>
>     def iter_foo():
>         MSFL.foo += 1
>

And don't forget that you would need to call this function as
MSFL.iter_foo(). Module-level functions are globals too.

ChrisA

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


Thread

the global keyword: Marcin Rak <mrak@sightlineinnovation.com> - 2016-06-11 16:44 -0700
  Re: the global keyword: Random832 <random832@fastmail.com> - 2016-06-11 19:50 -0400
    Re: the global keyword: Marcin Rak <mrak@sightlineinnovation.com> - 2016-06-11 17:12 -0700
      Re: the global keyword: Random832 <random832@fastmail.com> - 2016-06-11 21:27 -0400
    Re: the global keyword: Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-11 20:15 -0700
      Re: the global keyword: Random832 <random832@fastmail.com> - 2016-06-12 14:46 -0400
  Re: the global keyword: MRAB <python@mrabarnett.plus.com> - 2016-06-12 01:09 +0100
    Re: the global keyword: Marcin Rak <mrak@sightlineinnovation.com> - 2016-06-11 17:13 -0700
      Re: the global keyword: Ned Batchelder <ned@nedbatchelder.com> - 2016-06-11 20:41 -0700
  Re: the global keyword: Random832 <random832@fastmail.com> - 2016-06-11 21:26 -0400
    Re: the global keyword: Steven D'Aprano <steve@pearwood.info> - 2016-06-12 13:38 +1000
      Re: the global keyword: Ned Batchelder <ned@nedbatchelder.com> - 2016-06-11 20:48 -0700
        Re: the global keyword: Marcin Rak <mrak@sightlineinnovation.com> - 2016-06-12 11:31 -0700
  Re: the global keyword: BartC <bc@freeuk.com> - 2016-06-12 20:07 +0100
    Re: the global keyword: Ned Batchelder <ned@nedbatchelder.com> - 2016-06-12 12:25 -0700
      Re: the global keyword: BartC <bc@freeuk.com> - 2016-06-12 22:10 +0100
        Re: the global keyword: Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2016-06-19 16:35 +0200
          Re: the global keyword: BartC <bc@freeuk.com> - 2016-06-19 22:20 +0100
            Re: the global keyword: Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2016-06-20 13:14 +0200
              Re: the global keyword: Steven D'Aprano <steve@pearwood.info> - 2016-06-20 22:15 +1000
                Re: the global keyword: Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2016-06-20 15:04 +0200
                Re: the global keyword: Random832 <random832@fastmail.com> - 2016-06-20 09:29 -0400
                Re: the global keyword: Steven D'Aprano <steve@pearwood.info> - 2016-06-21 00:53 +1000
                Re: the global keyword: Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2016-06-21 10:08 +0200
                Re: the global keyword: BartC <bc@freeuk.com> - 2016-06-21 11:41 +0100
                Re: the global keyword: Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2016-06-21 13:01 +0200
        Re: the global keyword: Joel Goldstick <joel.goldstick@gmail.com> - 2016-06-19 13:16 -0400
          Re: the global keyword: Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-19 22:50 -0700
          Re: the global keyword: BartC <bc@freeuk.com> - 2016-06-20 11:21 +0100
            Re: the global keyword: Steven D'Aprano <steve@pearwood.info> - 2016-06-20 22:03 +1000
    Re: the global keyword: Rick Johnson <rantingrickjohnson@gmail.com> - 2016-06-21 10:04 -0700
      Re: the global keyword: Random832 <random832@fastmail.com> - 2016-06-21 13:15 -0400
        Re: the global keyword: Rick Johnson <rantingrickjohnson@gmail.com> - 2016-06-21 15:20 -0700
          Re: the global keyword: Chris Angelico <rosuav@gmail.com> - 2016-06-22 08:32 +1000
            Re: the global keyword: Rick Johnson <rantingrickjohnson@gmail.com> - 2016-06-21 16:43 -0700
          Re: the global keyword: BartC <bc@freeuk.com> - 2016-06-22 00:15 +0100
            Re: the global keyword: Rick Johnson <rantingrickjohnson@gmail.com> - 2016-06-21 17:24 -0700
              Re: the global keyword: BartC <bc@freeuk.com> - 2016-06-22 10:24 +0100
                Re: the global keyword: Steven D'Aprano <steve@pearwood.info> - 2016-06-24 11:00 +1000
                Re: the global keyword: Chris Angelico <rosuav@gmail.com> - 2016-06-24 11:19 +1000
                Re: the global keyword: eryk sun <eryksun@gmail.com> - 2016-06-24 02:19 +0000
          Re: the global keyword: Rick Johnson <rantingrickjohnson@gmail.com> - 2016-06-21 16:50 -0700

csiph-web