True inconsistency in Python

Michele Simionato mis6 at
Fri Nov 14 05:53:39 CET 2003

Gerrit Holl <gerrit at> wrote in message news:<mailman.726.1068754624.702.python-list at>...
> (btw, I _do_ use bool ocasionally: I implemented an anytrue() function
>  using sum([bool(i) for i in L]), is this wrong?)
> Gerrit.
> -- 
> 128. If a man take a woman to wife, but have no intercourse with her,
> this woman is no wife to him.
>           -- 1780 BC, Hammurabi, Code of Law

It does not shortcut, i.e. it creates the full list. For the rest, it
is a matter of personal opinion if this idea is considered cool or
an abuse of sum. I personally, will propend for the latter, but since 
we don't have yet an anytrue function in the library, for the moment it
can be tolered). Just my 0.02 E.


More information about the Python-list mailing list