<> and !=

Duncan Booth duncan at NOSPAMrcp.co.uk
Wed Jul 16 16:29:21 CEST 2003


hokiegal99 <hokiegal99 at hotmail.com> wrote in 
news:3F155B6D.8000205 at hotmail.com:

> Thank you, that is what I thought. What's the reason for having two 
> symbols mean the same thing?
> 
Originally Python only had '<>' for the not-equal comparison. Version 0.9.3 
added a bunch of C like syntax, such as C's shifting and masking operators. 
It also added C style '==' and '!=' comparison operators. The original '<>' 
remains valid for backwards compatibility.

-- 
Duncan Booth                                             duncan at rcp.co.uk
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?




More information about the Python-list mailing list