*blink* That's neat.

Niels Diepeveen niels at endea.demon.nl
Wed May 31 16:28:32 EDT 2000


Greg Ewing schreef:

> I ses this more as an argument in favour of having
> a proper boolean type which is clearly separated from
> the other types. If Python had that, things like
> 'if a == 1 or 2' would produce a type error instead
> of doing something unexpected.

That would indeed fix this problem, but there are other examples. Here
is one: some people tend to write "if a = 1 and a = 2" when they mean
"if a = 1 and if a = 2", which of course should be written as "if a = 1
or a = 2". Of course a real programmer would never make such a
mistake:-) but not everyone is a programmer (yet).

-- 
Niels Diepeveen
Endea automatisering




More information about the Python-list mailing list