Why prefer != over <> for Python 3.0?

Dan Bishop danb_83 at yahoo.com
Sat Mar 29 16:48:48 EDT 2008


On Mar 29, 6:08 am, Paul Rubin <http://phr...@NOSPAM.invalid> wrote:
> kwitt... at telenet.be writes:
> > I don't know if this is the right place to discuss the death of <> in
> > Python 3.0, or if there have been any meaningful discussions posted
> > before (hard to search google with '<>' keyword), but why would anyone
> > prefer the comparison operator != over <>???
>
> I doubt anyone cares.  Python probably chose != because it's what C uses.

MOST of Python's operators are based on C's.  Consider, for example,
the bitwise operators | ^ & << >> ~ and the compound assignment
operators += -= etc.

The exceptions are ** (from Fortran), //, and the logical operators.



More information about the Python-list mailing list