[Python-ideas] More useful slices (original) (raw)

Todd toddrjen at gmail.com
Mon Feb 2 11:19:30 CET 2015


On Sun, Feb 1, 2015 at 10:51 PM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:

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. Yes, I also considered that approach, but decided against proposing it for that reason. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150202/4a225c52/attachment.html>



More information about the Python-ideas mailing list