> Let me just point out that unsuspecting people (like me) might rely on
> the whole expression to be evaluated and rely on exceptions being
> raised if needed.

This happens when people assume something ;)
Use a different construct if you want to catch error's, I don't
understand how you could not get it?

>>> bool(1)
True
>>> bool(0)
False
>>> bool([])
False
>>> bool([0])
True
>>> bool([0,0,0])
True
>>> bool({})
False
>>> bool(())
False
see a pattern here?
>>> [] or {} or () or 0 or 1
1
>>> bool('python rules!')
True
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to