Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '*not*': 0.07; 'context': 0.07; 'received:151': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'itself.': 0.14; "'bar']": 0.16; 'emanuele': 0.16; 'mylist': 0.16; 'nick': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; "variable's": 0.16; 'wrote:': 0.18; 'variable': 0.18; '>>>': 0.22; 'header:User-Agent:1': 0.23; 'header:X-Complaints-To:1': 0.27; 'returned': 0.30; 'larry': 0.31; 'writes:': 0.31; 'actual': 0.34; '"the': 0.34; 'no,': 0.35; 'turn': 0.37; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'che': 0.60; 'talking': 0.65; 'quando': 0.84; 'subject:gets': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Lele Gaifax Subject: Re: A certainl part of an if() structure never gets executed. Date: Sat, 15 Jun 2013 11:54:08 +0200 Organization: Nautilus Entertainments References: <2bc90d3b-09c2-4315-9357-ff7f039465e0@googlegroups.com> <51b926a3$0$29997$c3e8da3$5496439d@news.astraweb.com> <51ba6e92$0$29997$c3e8da3$5496439d@news.astraweb.com> <51bb454c$0$29997$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: 151.62.75.33 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:wflLL1XtlKYUVt1/UE0XEYZncfI= X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 28 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1371290048 news.xs4all.nl 15945 [2001:888:2000:d::a6]:59038 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:48277 Nick the Gr33k writes: > On 15/6/2013 8:27 πμ, Larry Hudson wrote: >> Also they do NOT return "a variable's truthy value", they return the >> variable itself. > > No, as seen from my above examples, what is returned after the expr > eval are the actual variables' values, which in turn are truthy, *not* > the variable itself. In the context we are talking about, "the variable itself" has the very same meaning as "the actual variable value": >>> mylist = ['foo'] >>> emptylist = [] >>> result = emptylist or mylist >>> result.append('bar') >>> result is mylist True >>> print(mylist) ['foo', 'bar'] ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. lele@metapensiero.it | -- Fortunato Depero, 1929.