"!=" is bad form. Re: sorry....never mind
tim.one at home.com
Sat Mar 10 20:21:18 CET 2001
[Barry A. Warsaw]
> Personally, I agree. I hate "!="; to me <> looks much better and I
> use it all the time. Guido has been known to disagree with me so
> violently that he'll make a patch to my code just to change that. :)
I'm afraid it's again time to quote the Reference Manual:
The forms <> and != are equivalent; for consistency with C, != is
preferred; where != is mentioned below <> is also accepted. The
<> spelling is considered obsolescent.
Now I can channel many things in Guido's absence, but not even by asking
outright have I been able to divine the differences among "obsolescent",
"obsolete" and "deprecated" when applied to snake scales. All we can be sure
of is that they each refer to one of the modes in which a python seeks to
shed old skin.
If you look at the CVS history of Grammar/Grammar, you'll discover that In
The Beginning, Python allowed only the <> spelling. != wasn't added until
revision 1.5 (of Grammar, not Python). So this is a curious case where Guido
disowned his first impression (from only <>, to <> is obsolescent); but since
this is the same process by which your print>>file got into the language, you
had better not protest too loudly <wink>.
print>>-got-in-for-"consistency-with-c"-too-ly y'rs - tim
More information about the Python-list