diff --git a/NEWS.md b/NEWS.md index 74f76260f913ad..a6f81c36186f33 100644 --- a/NEWS.md +++ b/NEWS.md @@ -77,6 +77,7 @@ Standard library changes * New `ncodeunits(c::Char)` method as a fast equivalent to `ncodeunits(string(c))` ([#29153]). * `mean` and `var` now handles the empty case ([#29033]). * New `sort!(::AbstractArray; dims)` method that can sort the array along the `dims` dimension ([#28902]). + * `range` now accept `stop` as a positional argument ([#28708]). Compiler/Runtime improvements ----------------------------- diff --git a/base/range.jl b/base/range.jl index fe8097f4bd5731..785ade602f6bf8 100644 --- a/base/range.jl +++ b/base/range.jl @@ -60,6 +60,9 @@ automatically such that the elements are `step` spaced (a [`StepRange`](@ref)). `stop` may be specified as either a positional or keyword argument. +!!! compat "Julia 1.1" + `stop` as a positional argument requires at least Julia 1.1. + # Examples ```jldoctest julia> range(1, length=100)