-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Rename Range to AbstractRange #23570
Conversation
Rename Range to AbstractRange, and Range1 to UnitRange (which should have been done before).
416476e
to
afda0ea
Compare
OK to merge? This tends to accumulate conflicts quite fast. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments about some of the doc changes. Bravo for digging into the editor config files. 👍
base/abstractarray.jl
Outdated
@@ -172,7 +172,7 @@ first(a::AbstractArray) = a[first(eachindex(a))] | |||
first(coll) | |||
|
|||
Get the first element of an iterable collection. Returns the start point of a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pedant: a -> an
doc/src/manual/control-flow.md
Outdated
@@ -409,7 +409,7 @@ julia> for i = 1:5 | |||
5 | |||
``` | |||
|
|||
Here the `1:5` is a `Range` object, representing the sequence of numbers 1, 2, 3, 4, 5. The `for` | |||
Here the `1:5` is an `AbstractRange` object, representing the sequence of numbers 1, 2, 3, 4, 5. The `for` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be clearer to just say it's a UnitRange
or maybe even just "a range" (lowercase).
doc/src/manual/arrays.md
Outdated
@@ -348,7 +348,7 @@ indices and can be converted to such by [`to_indices`](@ref): | |||
2. An array of scalar indices. This includes: | |||
* Vectors and multidimensional arrays of integers | |||
* Empty arrays like `[]`, which select no elements | |||
* `Range`s of the form `a:c` or `a:b:c`, which select contiguous or strided subsections from `a` to `c` (inclusive) | |||
* `AbstractRange`s of the form `a:c` or `a:b:c`, which select contiguous or strided subsections from `a` to `c` (inclusive) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd simply say: "Ranges like a:c
…" Making this more jargon-y implies a distinction that doesn't exist.
Thanks for the review. Indeed the systematic replacement of |
-Range renamed AbstractRange JuliaLang/julia#23570 -squeeze renamed dropdims -immutable renamed struct JuliaLang/julia#20418
Fixes #21901.