Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #19053 > unrolled thread
| Started by | Chris Angelico <rosuav@gmail.com> |
|---|---|
| First post | 2012-01-17 17:50 +1100 |
| Last post | 2012-01-17 17:50 +1100 |
| 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: Comparing None and ints Chris Angelico <rosuav@gmail.com> - 2012-01-17 17:50 +1100
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2012-01-17 17:50 +1100 |
| Subject | Re: Comparing None and ints |
| Message-ID | <mailman.4807.1326783046.27778.python-list@python.org> |
On Tue, Jan 17, 2012 at 5:47 PM, Xavier Ho <contact@xavierho.com> wrote:
> What was the rationale behind this design? Specifically, (None < 0) == True
> and (None == 0) == False?
>
> Personally I would have expected an exception on all tests above.
Compare with Python 3:
>>> None<0
Traceback (most recent call last):
File "<pyshell#31>", line 1, in <module>
None<0
TypeError: unorderable types: NoneType() < int()
ChrisA
Back to top | Article view | comp.lang.python
csiph-web