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

Improve range: refactor, support start as an optional kwarg, clearer docs and error messages #38041

Merged
merged 20 commits into from
Jan 12, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update base/range.jl
Co-authored-by: Matt Bauman <mbauman@gmail.com>
  • Loading branch information
jw3126 and mbauman authored Jan 7, 2021
commit 1097661f56ccc69baa011c90b562b9ee51b77ca9
5 changes: 2 additions & 3 deletions base/range.jl
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,8 @@ julia> range(1, 3.5, step=2)
Special care is taken to ensure intermediate values are computed rationally.
To avoid this induced overhead, see the [`LinRange`](@ref) constructor.

`start` may be specified as either a positional or keyword argument.
`stop` may be specified as either a positional or keyword argument. If it is specified as a positional argument,
one of `step` or `length` must also be provided.
Both `start` and `stop` may be specified as either a positional or keyword arguments.
If both are specified as positional arguments, one of `step` or `length` must also be provided.

!!! compat "Julia 1.1"
`stop` as a positional argument requires at least Julia 1.1.
Expand Down