True inconsistency in Python
mis6 at pitt.edu
Fri Nov 14 05:53:39 CET 2003
Gerrit Holl <gerrit at nl.linux.org> wrote in message news:<mailman.726.1068754624.702.python-list at python.org>...
> (btw, I _do_ use bool ocasionally: I implemented an anytrue() function
> using sum([bool(i) for i in L]), is this wrong?)
> 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