Added compat annotation in range.jl#43277
Closed
adityagi02 wants to merge 2 commits into
Closed
Conversation
mcabbott
reviewed
Dec 2, 2021
Comment on lines
-50
to
+53
| range(start, stop, length) | ||
| range(start, stop; length, step) | ||
| range(start; length, stop, step) | ||
| range(;start, length, stop, step) | ||
| range([start, stop]; length, stop, step=1) | ||
|
|
||
| Construct a specialized array with evenly spaced elements and optimized storage (an [`AbstractRange`](@ref)) from the arguments. | ||
| Mathematically a range is uniquely determined by any three of `start`, `step`, `stop` and `length`. | ||
| Valid invocations of range are: | ||
| * Call `range` with any three of `start`, `step`, `stop`, `length`. | ||
| * Call `range` with two of `start`, `stop`, `length`. In this case `step` will be assumed | ||
| to be one. If both arguments are Integers, a [`UnitRange`](@ref) will be returned. | ||
| * Call `range` with one of `stop` or `length`. `start` and `step` will be assumed to be one. | ||
| Given a starting value, construct a range either by length or from `start` to `stop`, | ||
| optionally with a given step (defaults to 1, a [`UnitRange`](@ref)). If `length`, `stop`, and `step` are all specified, they must agree. |
Contributor
There was a problem hiding this comment.
Do you mean to change all the wording here? I think explaining "range" by saying it "constructs a range" is a bit circular.
This was last changed here: #38041 (comment) . The proposed words look a bit like the ones from before. So perhaps this is just a git problem?
Member
There was a problem hiding this comment.
Probably it should have been a PR to the 1.6 branch? In any case; it is updated now after the 1.7.0 docs deploy: https://docs.julialang.org/en/v1/base/math/#Base.range
Author
There was a problem hiding this comment.
Yes it was for 1.6 documentation, but now after this 1.7 docs deployment there is no need for it, I think I must close it now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #43194