diff --git a/NEWS.md b/NEWS.md index 37454512b03e8..82bc884133b07 100644 --- a/NEWS.md +++ b/NEWS.md @@ -75,6 +75,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 fe8097f4bd573..785ade602f6bf 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)