Skip to content
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

Added compat annotation in range.jl #43277

Closed
wants to merge 2 commits into from

Conversation

adityagi02
Copy link

Fixes #43194

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.
Copy link
Contributor

@mcabbott mcabbott Dec 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@adityagi02 adityagi02 closed this Dec 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing range method
3 participants