Inconsistency in Python's Comparisons
Andrew Koenig
ark at acm.org
Wed Mar 17 14:58:18 EST 2004
"Peter Hansen" <peter at engcorp.com> wrote in message
news:Ze6dncncZq9qCcXdRVn-tA at powergate.ca...
> Andrew Koenig wrote:
> > "Erik Max Francis" <max at alcyone.com> wrote in message
> > news:4057B2A4.F9EC49DD at alcyone.com...
> >>Do you have an example of this that doesn't involve comparisons between
> >>different types?
> > Do long and float count as different types?
>
> Was this a trick question?
Not particularly. Although long and float are obviously different types, I
suspect that most people who say that they do not expect comparisons between
different types to work, they do expect comparisons to work consistently
between integers and floating-point values.
More information about the Python-list
mailing list