Re: Comparison operators in Python

2011-06-02 Thread Michael Sparks
On Jun 2, 1:44 am, harrismh777 wrote: .. >     Just another example (excluding  print  1/2  and  unicode) where 3.x > seems to be completely compatible with 2.x/   (tongue-in-cheek) One of the key purposes of the 3.x line of code is to get rid of warts in the language. As a result, if someone is

Re: Comparison operators in Python

2011-06-01 Thread Terry Reedy
On 6/1/2011 8:44 PM, harrismh777 wrote: Ian Kelly wrote: >> ?? 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

Re: Comparison operators in Python

2011-06-01 Thread harrismh777
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 (ex

Re: Comparison operators in Python

2011-06-01 Thread Ian Kelly
On Wed, Jun 1, 2011 at 12:50 PM, Anirudh Sivaraman wrote: > Hi > > I am a relative new comer to Python. I see that typing is strongly > enforced in the sense you can't concatenate or add a string and an > integer. However comparison between a string and an integer seems to > be permitted. Is there

Re: Comparison operators in Python

2011-06-01 Thread Jussi Piitulainen
Anirudh Sivaraman writes: > I am a relative new comer to Python. I see that typing is strongly > enforced in the sense you can't concatenate or add a string and an > integer. However comparison between a string and an integer seems to > be permitted. Is there any rationale behind this ? In Python

Comparison operators in Python

2011-06-01 Thread Anirudh Sivaraman
Hi I am a relative new comer to Python. I see that typing is strongly enforced in the sense you can't concatenate or add a string and an integer. However comparison between a string and an integer seems to be permitted. Is there any rationale behind this ? Anirudh -- http://mail.python.org/mailm