Re:The Zen of Python by Example
by fjh on Thursday February 10, 2011 @05:01PM
(#2204007)
I would argue that that is not very pythonic, since it breaks the "explicit is better than implicit" guideline.
[ Parent
| on HN ]
Re:The Zen of Python by Example
by koenigdavidmj on Thursday February 10, 2011 @08:03PM
(#2204684)
Most Python people are okay with relying on the behaviour of what is truthful and what is not. They would often prefer to see
if foo:
do_stuff()
over if len(foo) > 0:
do_stuff()