Steven D'Aprano wrote:
modelled. Lists do not have truth values in the application domain
Yes they do. Empty lists are nothing, ergo false, and non-empty lists are
something, ergo true.
No they don't. Empty lists are empty lists... which just happen to
become False when type cast bool(list[])--> False.
lists cannot have a truth... binary False or True... however, when cast
with bool(list) they can be used in a test (even with 'not') to make
some decision.
Lists by themselves, empty or not, cannot have a 'truth' in an of
themselves.
kind regards,
m harris
--
http://mail.python.org/mailman/listinfo/python-list