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

Skip Montanaro skip.montanaro at gmail.com
Mon Feb 2 20:20:30 CET 2015


On Mon, Feb 2, 2015 at 12:46 PM, Chris Barker <chris.barker at noaa.gov> wrote:

On Mon, Feb 2, 2015 at 10:00 AM, Skip Montanaro <skip.montanaro at gmail.com> wrote:

As I indicated in an earlier response, there is some performance value to replacing the range function call with this (or other) syntactic sugar. It's my impression that adding stuff like this primarily for performance is nothing on the list ;-)

I wasn't arguing for its inclusion, just explaining that there is potentially more than a few characters of typing to be saved. (Someone asked if that was the only benefit of the proposal.)

FWIW, at least some compilers (Shed Skin, I believe, perhaps Cython and/or Pyrex as well) already treat range() as a builtin constant.

Skip -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150202/44b7dc81/attachment.html>



More information about the Python-ideas mailing list