-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Doc missing range exports #28115
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
Doc missing range exports #28115
Conversation
|
oh yeah the doc tests passed locally for me |
|
Anyone feel like reviewing this? |
base/range.jl
Outdated
| Supertype for ordinal ranges with elements of type `T` with | ||
| spacing(s) of type `S`. | ||
| An ordinal range is one whose values have a well-defined ordering. |
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.
This may be true, but I think it should be true of all ranges. I think the key property that we're going after here — and the reasoning behind the word Ordinal in this name — is that its subtypes have always-exact steps that are multiples of oneunit, and T should be a "discrete" datatype where it's not possible to represent values smaller than oneunit.
I think. Can anyone back me up on this?
base/range.jl
Outdated
| """ | ||
| AbstractUnitRange{T} <: OrdinalRange{T, T} | ||
| Supertype for unit ranges with elements of type `T`. |
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 think I'd prefer ranges with a step size of [`oneunit`](@ref)` over "unit ranges".
base/range.jl
Outdated
| Ranges with elements of type `T` with spacing of type `S`. The step | ||
| between each element is constant, and the range is defined in terms | ||
| of a `start` and `stop` of type `T` and a `step` of type `S`. Neither | ||
| `T` nor `S` should be floating point types. |
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.
Maybe add a note that the syntax 1:2:10 with integer values creates StepRanges?
| UnitRange{T<:Real} | ||
| A range parameterized by a `start` and `stop` of type `T`, filled | ||
| with elements spaced by `1` from `start` until `stop` is exceeded. |
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.
The syntax x:y with integer values x and y creates a UnitRange.
mbauman
left a comment
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.
One last comment and then this is good to go. Thanks!
base/range.jl
Outdated
| Supertype for ordinal ranges with elements of type `T` with | ||
| spacing(s) of type `S`. | ||
| The spacing of the elements of the range does not need to be even. The steps |
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'm not sure what "The spacing of the elements of the range does not need to be even" means. Maybe just remove this sentence?
|
OK I deleted the comment! And CI passed! Gonna merge :) |
refs too