Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #6842
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Subject | Re: Comparison operators in Python |
| Date | 2011-06-02 02:09 -0400 |
| References | <0dda7cc8-e1c0-409d-b993-b8aec379f7bd@hd10g2000vbb.googlegroups.com> <mailman.2378.1306955816.9059.python-list@python.org> <62BFp.19321$pi2.14587@newsfe11.iad> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2382.1306994970.9059.python-list@python.org> (permalink) |
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 was fixed in Python 3: This was a Python 1.0 idea that Guido decided was more bug-inducing than useful. > Just another example (excluding print 1/2 and unicode) where 3.x seems > to be completely compatible with 2.x/ (tongue-in-cheek) Arbitrary comparisons were broken and effectively deprecated about a decade ago with the introduction of the complex type. Just another example where 3.x completes a process of change started years before. -- Terry Jan Reedy
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Comparison operators in Python Anirudh Sivaraman <sk.anirudh@gmail.com> - 2011-06-01 11:50 -0700
Re: Comparison operators in Python Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2011-06-01 22:08 +0300
Re: Comparison operators in Python Ian Kelly <ian.g.kelly@gmail.com> - 2011-06-01 13:16 -0600
Re: Comparison operators in Python harrismh777 <harrismh777@charter.net> - 2011-06-01 19:44 -0500
Re: Comparison operators in Python Terry Reedy <tjreedy@udel.edu> - 2011-06-02 02:09 -0400
Re: Comparison operators in Python Michael Sparks <sparks.m@gmail.com> - 2011-06-02 03:05 -0700
csiph-web