News for hackers. Stuff that matters.
Re:A few things to remember while coding in Python by dmg8 on Saturday May 19, 2012 @05:51PM (#3997192)
The parens are required. What you've written raises a SyntaxError.

You can omit them in the generator expression if it's being passed directly as the only parameter to a function:

  halve_evens_only = list(i/2 for i in nums if i % 2 != 0)

There are no comments on this comment yet.