News for hackers. Stuff that matters.
Re:The Zen of Python by Example by l0nwlf on Thursday February 10, 2011 @03:30PM (#2203572)
I would go for more pythonic "not i % 2".
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.
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()