Comparisons and sorting of a numeric class....

Steven D'Aprano steve+comp.lang.python at pearwood.info
Fri Jan 9 13:27:52 CET 2015


Chris Kaynor wrote:

> Lately, I've been doing quite a bit of work in lua, and many times have
> wished that empty strings, tables, and 0 acted "falsey", but at the same
> time, previously working in Python, there were plenty of times I wished
> they acted "truthy". It merely depends on what algorithm I am using at the
> time...


Please do elaborate. I've never found myself in a situation where I have
wanted empty containers to be truthy, and I can't think of what such a
situation would be like.



-- 
Steven




More information about the Python-list mailing list