Closed GoogleCodeExporter closed 9 years ago
In CPython:
print (2 < 3 < 9)
# yields True
print (2 < (3 < 9))
# yields False, because 2 is not < True (which "equals" 1)
The latter statement just fails in skulpt, for reasons unknown but probably
having to do with this issue.
Original comment by carnioja...@gmail.com
on 29 Nov 2010 at 5:11
Also, when this has been implemented, test ~True and ~False (should yield -2
and -1)
Original comment by carnioja...@gmail.com
on 29 Nov 2010 at 5:28
print False == 0
print True == 1
print True == 2
and ~True and ~False work now.
Multi-condition compares are going to take a bit more work.
Original comment by sgraham
on 30 Nov 2010 at 5:49
Multi-condition fixed now (t268, t273).
Original comment by sgraham
on 3 Dec 2010 at 1:43
You should already know that, but AFAIK, Boolean values are a special case of
integers. That kind of explains while False and True are equal to 0 and 1.
Original comment by denilsonsa
on 5 Dec 2010 at 3:38
Original issue reported on code.google.com by
carnioja...@gmail.com
on 29 Nov 2010 at 5:05