two ideoms at one blow: line-reading and regexp-matching

Magnus Lyckå magnus at thinkware.se
Fri Feb 22 10:59:00 EST 2002


Paul Rubin wrote:

> Oh come on, the most common errors in C are probably pointer errors.

Ok, so it's just the second most common error. I've
certainly written "if a = b" when I meant == in C++.
Especially when I'm switching between C++ ans SQL...

Also, making expressions return their value to the
left like that breaks: 4 < x < 8

In python that returns true for x in [5, 6, 7]. If
it worked like you want it would be either (4 < x) < 8
or 4 < (x < 8), and youd have to write interval tests
as (4 < x) and (x < 8)




More information about the Python-list mailing list