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


Groups > comp.lang.python > #34098

Re: amazing scope?

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <andrea.crotti.0@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.016
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'received:209.85.223': 0.03; 'cc:addr:python-list': 0.10; 'anyway': 0.11; 'guilty': 0.16; 'module': 0.19; 'bit': 0.21; 'fine,': 0.22; 'defined': 0.22; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'message-id:@mail.gmail.com': 0.27; 'function': 0.30; 'received:google.com': 0.34; 'subject:?': 0.35; 'received:209.85': 0.35; 'something': 0.35; 'received:209': 0.37; 'subject:: ': 0.38; 'header:Received:5': 0.40; 'suprise': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=hKQ9IQI5dkrgNZKKbuqGby2IfcI6Lw/WQlykLmr214Q=; b=AtZ6DxqAcRfWEX018O35tPwts5ddYy/cXKeHggnj6WwwNSJDQ/e5pKyXu4/iCecDPy 8AwLsrckF0ZgLJdYt6GcihFHqbood+M5LA3z/ct6YeIHRecYTtNXWbWlzmmMRs8slirX u8+rJ5UdBfvL9lfW96uc92ZKF0ncaaqNCZLxjv7BkB7VwxTV1VyV7E6Fbzk9QxB1JpQB 87MdLnKSaWLVmsa6K8sTsx+l3qxAXRHs325MvcLtkn2riiZ6vNLm/MI0bqbSy7aon3Dc F5Xj6i3zGKRc8o61WC4Aids5aB5v+TM1kWah9ibeQ4KdvBLT7/psu8fs5debKrWKTzX/ aM5A==
MIME-Version 1.0
In-Reply-To <thhmo9-ie6.ln1@satorlaser.homedns.org>
References <mailman.380.1354273891.29569.python-list@python.org> <thhmo9-ie6.ln1@satorlaser.homedns.org>
Date Fri, 30 Nov 2012 16:05:40 +0000
Subject Re: amazing scope?
From andrea crotti <andrea.crotti.0@gmail.com>
To Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com>
Content-Type text/plain; charset=ISO-8859-1
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.384.1354291543.29569.python-list@python.org> (permalink)
Lines 7
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1354291543 news.xs4all.nl 6910 [2001:888:2000:d::a6]:60481
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:34098

Show key headers only | 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