Comparison operators in Python
harrismh777
harrismh777 at charter.net
Wed Jun 1 20:44:50 EDT 2011
Ian Kelly wrote:
>> integer. However comparison between a string and an integer seems to
>> > be permitted. Is there any rationale behind this ?
> It allows things like sorting of heterogeneous lists. It's generally
> viewed as a wart, though, and it was fixed in Python 3:
>
Just another example (excluding print 1/2 and unicode) where 3.x
seems to be completely compatible with 2.x/ (tongue-in-cheek)
(do Brits say tongue-in-cheek?)
:)
... just saying.
More information about the Python-list
mailing list