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


Groups > comp.lang.python > #48226

Re: Eval of expr with 'or' and 'and' within

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news.mb-net.net!open-news-network.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.017
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'mrab': 0.05; 'sql.': 0.07; "subject:' ": 0.07; 'false.': 0.09; 'objects,': 0.09; 'wrong,': 0.09; 'random': 0.14; '(there': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'nan': 0.16; 'nose': 0.16; 'pinned': 0.16; 'sat,': 0.16; 'weird': 0.16; 'wrote:': 0.18; '>>>': 0.22; '15,': 0.26; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'chris': 0.29; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'though.': 0.31; 'maybe': 0.34; 'subject:with': 0.35; 'objects': 0.35; 'received:google.com': 0.35; 'url:org': 0.36; 'expected': 0.38; 'e.g.': 0.38; 'to:addr:python-list': 0.38; 'realize': 0.39; 'to:addr:python.org': 0.39; 'enough': 0.39; 'most': 0.60; "you've": 0.63; 'expectations': 0.74; 'cousins': 0.84; 'sometimes.': 0.84; 'url:php': 0.85; 'edwards': 0.91; 'you...': 0.96; '2013': 0.98
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 :content-type; bh=cWxW6i8QS7BflZ/Aft9wqmsDh+WLLuyyAg3t3s9RCAI=; b=KzphggJXRD6YItXUQeBs8UWl+uE9TeLR5RzF9lVXIrG2zew8OvsF5YToVTvpAFlwou psMGoR22b+lmgCiFuyEB83EcocWsmM5ZqJORDMfKVA4A9Sf5/bKJfov7VZnF9bnOUInt F3UAFm9J0dVQ/IQKThEnnJP2/mU1AexrUnZ60DVUG1acKirDbUCyQVRkNnoOvk+lfLJj oaz9LnIJOiTA7fH+1sOl+I6k0mxr0QZlBwdymbSgUQD/p19MwL8HP0fL2YSCfNyR/Ede 1tQXFEe/VCu0GDlCK/bVwNVdmkN36gnezQWdsVJq7lasZWbWrNXni7XjV1tToR5h94JV q99g==
MIME-Version 1.0
X-Received by 10.52.164.163 with SMTP id yr3mr1347361vdb.76.1371254165634; Fri, 14 Jun 2013 16:56:05 -0700 (PDT)
In-Reply-To <kpfr75$sd2$2@reader1.panix.com>
References <kpep0v$spl$8@news.ntua.gr> <mailman.3314.1371227385.3114.python-list@python.org> <51bb4986$0$29997$c3e8da3$5496439d@news.astraweb.com> <51BB52C5.60202@gmail.com> <51BB5797.4030705@mrabarnett.plus.com> <mailman.3330.1371232596.3114.python-list@python.org> <kpfr75$sd2$2@reader1.panix.com>
Date Sat, 15 Jun 2013 09:56:05 +1000
Subject Re: Eval of expr with 'or' and 'and' within
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
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.3339.1371254168.3114.python-list@python.org> (permalink)
Lines 27
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1371254168 news.xs4all.nl 15886 [2001:888:2000:d::a6]:44692
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:48226

Show key headers only | View raw


On Sat, Jun 15, 2013 at 5:33 AM, Grant Edwards <invalid@invalid.invalid> wrote:
> On 2013-06-14, Chris Angelico <rosuav@gmail.com> wrote:
>> On Sat, Jun 15, 2013 at 3:49 AM, MRAB <python@mrabarnett.plus.com> wrote:
>>> The general rule is that an object is true-ish unless it's false-ish
>>> (there are fewer false-ish objects than true-ish objects, e.g. zero vs
>>> non-zero int).
>>
>> With a few random oddities:
>>
>>>>> bool(float("nan"))
>> True
>>
>> I somehow expected NaN to be false. Maybe that's just my expectations
>> that are wrong, though.
>
> If you work with floating point long enough you realize that most of
> your expectations are wrong.  Sometimes.  Eventually.

NaN is like NULL in SQL. It's a weird beast. Just when you think
you've pinned it down, it slips out from under your taxonomic
classifications and thumbs its nose at you...

I think they're cousins to the platypus.

http://tvtropes.org/pmwiki/pmwiki.php/Main/EverythingsBetterWithPlatypi

ChrisA

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


Thread

Eval of expr with 'or' and 'and' within Nick the Gr33k <support@superhost.gr> - 2013-06-14 12:50 +0300
  Re: Eval of expr with 'or' and 'and' within Fábio Santos <fabiosantosart@gmail.com> - 2013-06-14 11:03 +0100
  Re: Eval of expr with 'or' and 'and' within Robert Kern <robert.kern@gmail.com> - 2013-06-14 11:14 +0100
    Re: Eval of expr with 'or' and 'and' within Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-14 16:09 +0000
      Re: Eval of expr with 'or' and 'and' within rusi <rustompmody@gmail.com> - 2013-06-14 09:21 -0700
      Re: Eval of expr with 'or' and 'and' within Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2013-06-14 20:03 +0200
        Re: Eval of expr with 'or' and 'and' within rusi <rustompmody@gmail.com> - 2013-06-14 11:37 -0700
          Re: Eval of expr with 'or' and 'and' within Joshua Landau <joshua.landau.ws@gmail.com> - 2013-06-14 19:47 +0100
      Re: Eval of expr with 'or' and 'and' within alex23 <wuwei23@gmail.com> - 2013-06-14 23:50 -0700
        Re: Eval of expr with 'or' and 'and' within Nick the Gr33k <support@superhost.gr> - 2013-06-15 10:04 +0300
          Re: Eval of expr with 'or' and 'and' within Denis McMahon <denismfmcmahon@gmail.com> - 2013-06-15 07:49 +0000
            Re: Eval of expr with 'or' and 'and' within Nick the Gr33k <support@superhost.gr> - 2013-06-15 10:59 +0300
  Re: Eval of expr with 'or' and 'and' within Grant Edwards <invalid@invalid.invalid> - 2013-06-14 14:49 +0000
    Re: Eval of expr with 'or' and 'and' within Nick the Gr33k <support@superhost.gr> - 2013-06-14 18:16 +0300
      Re: Eval of expr with 'or' and 'and' within Nobody <nobody@nowhere.com> - 2013-06-14 17:42 +0100
        Re: Eval of expr with 'or' and 'and' within Grant Edwards <invalid@invalid.invalid> - 2013-06-14 19:30 +0000
          Re: Eval of expr with 'or' and 'and' within Nobody <nobody@nowhere.com> - 2013-06-15 00:02 +0100
        Re: Eval of expr with 'or' and 'and' within Nick the Gr33k <support@superhost.gr> - 2013-06-15 10:57 +0300
  Re: Eval of expr with 'or' and 'and' within Michael Torrie <torriem@gmail.com> - 2013-06-14 10:29 -0600
    Re: Eval of expr with 'or' and 'and' within Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-14 16:49 +0000
      Re: Eval of expr with 'or' and 'and' within Michael Torrie <torriem@gmail.com> - 2013-06-14 11:28 -0600
      Re: Eval of expr with 'or' and 'and' within MRAB <python@mrabarnett.plus.com> - 2013-06-14 18:49 +0100
      Re: Eval of expr with 'or' and 'and' within Chris Angelico <rosuav@gmail.com> - 2013-06-15 03:56 +1000
        Re: Eval of expr with 'or' and 'and' within Grant Edwards <invalid@invalid.invalid> - 2013-06-14 19:33 +0000
          Re: Eval of expr with 'or' and 'and' within Chris Angelico <rosuav@gmail.com> - 2013-06-15 09:56 +1000
        Re: Eval of expr with 'or' and 'and' within Nobody <nobody@nowhere.com> - 2013-06-15 00:09 +0100
          Re: Eval of expr with 'or' and 'and' within Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-15 01:34 +0000
            Re: Eval of expr with 'or' and 'and' within Cameron Simpson <cs@zip.com.au> - 2013-06-15 12:03 +1000
              NANs [was Re: Eval of expr with 'or' and 'and' within] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-15 04:22 +0000
            Re: Eval of expr with 'or' and 'and' within Chris Angelico <rosuav@gmail.com> - 2013-06-15 12:21 +1000
      Re: Eval of expr with 'or' and 'and' within Nobody <nobody@nowhere.com> - 2013-06-15 00:06 +0100
        Re: Eval of expr with 'or' and 'and' within MRAB <python@mrabarnett.plus.com> - 2013-06-15 01:26 +0100
  Re: Eval of expr with 'or' and 'and' within Benjamin Kaplan <benjamin.kaplan@case.edu> - 2013-06-14 09:47 -0700
    Re: Eval of expr with 'or' and 'and' within Nick the Gr33k <support@superhost.gr> - 2013-06-14 20:01 +0300
      Re: Eval of expr with 'or' and 'and' within Robert Kern <robert.kern@gmail.com> - 2013-06-14 18:27 +0100
      Re: Eval of expr with 'or' and 'and' within Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2013-06-14 22:05 +0300
      Re: Eval of expr with 'or' and 'and' within Grant Edwards <invalid@invalid.invalid> - 2013-06-14 19:36 +0000
  Re: Eval of expr with 'or' and 'and' within Cameron Simpson <cs@zip.com.au> - 2013-06-15 10:14 +1000
    Re: Eval of expr with 'or' and 'and' within Nick the Gr33k <support@superhost.gr> - 2013-06-15 11:20 +0300
      Re: Eval of expr with 'or' and 'and' within Lele Gaifax <lele@metapensiero.it> - 2013-06-15 11:48 +0200
        Re: Eval of expr with 'or' and 'and' within Nick the Gr33k <support@superhost.gr> - 2013-06-15 16:24 +0300
        Re: Eval of expr with 'or' and 'and' within Nick the Gr33k <support@superhost.gr> - 2013-06-15 16:28 +0300

csiph-web