if <assignment>:

Dave Brueck dave at pythonapocrypha.com
Tue Nov 26 11:33:06 EST 2002


On Tue, 26 Nov 2002, Brad Hards wrote:

> On Tue, 26 Nov 2002 10:33, Delaney, Timothy wrote:
> > The most common of these are = vs ==, and just about anything to do with
> > pointer dereferencing.
> There are some useful defensive techniques. I often test for equality to a 
> constant. If you put the constant on the left side, the compiler will help 
> you:
> eg. if ( 0 == pointer) { }

Ugh! Shame on any aspect of a language that burdens the developer this
way. The fact that such strategies as the above have cropped up is, IMO, 
proof that the language is broken in that area. We don't say, "Is Tuesday 
today?" or "Is 5 your age?", either. :)

-Dave





More information about the Python-list mailing list