[Python-ideas] More useful slices

Greg Ewing greg.ewing at canterbury.ac.nz
Sun Feb 1 22:51:41 CET 2015


Eugene Toder wrote:
> It may be too late for this, but I like it. We can also elide extra 
> parentheses inside calls, like with generator expressions:
> sum(4:10:2)
> 
> Also, using list comprehension to generator expression analogy, we can have
> [4:10:2]

But putting those two analogies together, (4:10:2) on
its own should be a generator expression rather than
a range object.

-- 
Greg


More information about the Python-ideas mailing list