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


Groups > comp.lang.python > #34098

Re: amazing scope?

References <mailman.380.1354273891.29569.python-list@python.org> <thhmo9-ie6.ln1@satorlaser.homedns.org>
Date 2012-11-30 16:05 +0000
Subject Re: amazing scope?
From andrea crotti <andrea.crotti.0@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.384.1354291543.29569.python-list@python.org> (permalink)

Show all headers | View raw


Well I knew that this works fine, even if I feel a bit guilty to do
this, and better is:

foo = 'bar' if some_condition else 'baz'

Anyway for me the suprise is that something that is defined *later* at
the module scope is found in a function which is defined *earlier*.

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


Thread

amazing scope? andrea crotti <andrea.crotti.0@gmail.com> - 2012-11-30 11:11 +0000
  Re: amazing scope? Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2012-11-30 12:23 +0100
    Re: amazing scope? andrea crotti <andrea.crotti.0@gmail.com> - 2012-11-30 16:05 +0000
    Re: amazing scope? Chris Angelico <rosuav@gmail.com> - 2012-12-01 03:08 +1100
    Re: amazing scope? Dave Angel <d@davea.name> - 2012-11-30 17:57 -0500

csiph-web