[Issue 7896] Sequence slicing
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Apr 13 04:21:13 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7896
bearophile_hugs at eml.cc changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bearophile_hugs at eml.cc
--- Comment #3 from bearophile_hugs at eml.cc 2012-04-13 04:21:59 PDT ---
(In reply to comment #2)
> With range concept, slicing operator with boundaries has no meaning.
I think the point of this enhancement request is to give a meaning to that
syntax.
So:
someRange[x .. y]
becomes syntax sugar for calling a function like:
itertools.islice(someRange, x, y)
of Python:
http://docs.python.org/library/itertools.html#itertools.islice
the idea of giving some more syntax support to D lazy ranges isn't that bad.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list