-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggesting new syntax: a..b #8949
Comments
Ranges can already do exactly those things. See http://nbviewer.ipython.org/gist/pao/dbd0a405a56afd6dbfa2 (and a special thanks to http://tmpnb.org for making this example straightforward to create) |
This is exactly the problem. |
There are already several issues discussing this, which you have linked to – why open a duplicate issue intentionally? |
Simple, because this is a new syntax. |
New syntax is not something that should be added lightly. |
You can create an array of ranges using UnitRange[1:3, 1:5] |
Dense range vectors should be avoided, so I don't think they deserve |
I would suggest that new syntax "a..b" represents "[a, a+1, a+2, ... , b]".
The followings should then become true:
"1..5" represents "[1, 2, 3, 4, 5]".
"reverse(1..5)" represents "[5, 4, 3, 2, 1]".
"1..99[1:2:end]" represents "[1, 3, 5, 7, ..., 99]".
Related issue: #3737
The text was updated successfully, but these errors were encountered: