Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #105563 > unrolled thread
| Started by | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| First post | 2016-03-23 14:00 -0400 |
| Last post | 2016-03-23 14:00 -0400 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: 0 equals False, was Re: (unknown) Terry Reedy <tjreedy@udel.edu> - 2016-03-23 14:00 -0400
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Date | 2016-03-23 14:00 -0400 |
| Subject | Re: 0 equals False, was Re: (unknown) |
| Message-ID | <mailman.62.1458756067.2244.python-list@python.org> |
On 3/23/2016 4:51 AM, Peter Otten wrote: > The pythonic solution is "don't do this". The == operator cannot > discriminate between 0, 0.0, and False, and 0j and Fraction(0, 1) and Decimal(0) > or 1, 1.0, and True and 1+0j, Fraction(1, 1) and Decimal(1) Sets and dicts are based both based on (transitive) equality. -- Terry Jan Reedy
Back to top | Article view | comp.lang.python
csiph-web