Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #79539
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Denis McMahon <denismfmcmahon@gmail.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: Truthiness |
| Date | Thu, 23 Oct 2014 16:07:14 +0000 (UTC) |
| Organization | A noiseless patient Spider |
| Lines | 19 |
| Message-ID | <m2b93i$u0g$3@dont-email.me> (permalink) |
| References | <61f0b04c-b827-4c03-b55d-4d5bd85b56f6@googlegroups.com> <87bnp23ksg.fsf@dpt-info.u-strasbg.fr> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 8bit |
| Injection-Date | Thu, 23 Oct 2014 16:07:14 +0000 (UTC) |
| Injection-Info | mx02.eternal-september.org; posting-host="66ffcfa4470a58bcddbdcd1913f98ab4"; logging-data="30736"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+1FmzDPgQs4T9VxqfqcG4EFfz/ZQvp4qU=" |
| User-Agent | Pan/0.136 (I'm far too busy being delicious; GIT 926a150 git://git.gnome.org/pan2) |
| Cancel-Lock | sha1:kC48MyBgfxMT98I/Q0RGJdSk5nc= |
| Xref | csiph.com comp.lang.python:79539 |
Show key headers only | View raw
On Thu, 23 Oct 2014 16:47:27 +0200, Alain Ketterlin wrote: > says: "In the context of Boolean operations, and also when expressions > are used by control flow statements, the following values are > interpreted as false: False, None, numeric zero of all types, and empty > strings and containers (including strings, tuples, lists, dictionaries, > sets and frozensets). All other values are interpreted as true." Yep, and I expect this to bite S4H shortly, when he can't understand why the following are not all of the same truthiness: 0 (falsey - numeric 0) [] (falsey - empty set) "" (falsey - empty string) [""] (truthy - non empty set) [0] (truthy - non empty set) -- Denis McMahon, denismfmcmahon@gmail.com
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Truthiness Simon Kennedy <sffjunkie@gmail.com> - 2014-10-23 07:30 -0700
Re: Truthiness Ian Kelly <ian.g.kelly@gmail.com> - 2014-10-23 08:45 -0600
Re: Truthiness Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-10-24 11:42 +1100
Re: Truthiness Alain Ketterlin <alain@dpt-info.u-strasbg.fr> - 2014-10-23 16:47 +0200
Re: Truthiness Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> - 2014-10-23 17:01 +0200
Re: Truthiness Denis McMahon <denismfmcmahon@gmail.com> - 2014-10-23 16:07 +0000
Re: Truthiness Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> - 2014-10-23 16:49 +0200
Re: Truthiness Skip Montanaro <skip.montanaro@gmail.com> - 2014-10-23 09:51 -0500
Re: Truthiness Simon Kennedy <sffjunkie@gmail.com> - 2014-10-23 07:56 -0700
Re: Truthiness random832@fastmail.us - 2014-10-23 11:24 -0400
csiph-web