Skip to content

Commit 7fc294b

Browse files
committed
add compat annotations for replace on tuples
The methods were added in #38216.
1 parent c7097c5 commit 7fc294b

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

HISTORY.md

+2
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ Standard library changes
143143
* `replace(::String)` now accepts multiple patterns, which will be applied left-to-right simultaneously,
144144
so only one pattern will be applied to any character, and the patterns will only be applied to the input
145145
text, not the replacements ([#40484]).
146+
* New `replace` methods to replace elements of a `Tuple`.
147+
146148

147149
#### Package Manager
148150

base/set.jl

+6
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,9 @@ replaced.
548548
549549
See also [`replace!`](@ref), [`splice!`](@ref), [`delete!`](@ref), [`insert!`](@ref).
550550
551+
!!! compat "Julia 1.7"
552+
Version 1.7 is required to replace elements of a `Tuple`.
553+
551554
# Examples
552555
```jldoctest
553556
julia> replace([1, 2, 1, 3], 1=>0, 2=>4, count=2)
@@ -596,6 +599,9 @@ Return a copy of `A` where each value `x` in `A` is replaced by `new(x)`.
596599
If `count` is specified, then replace at most `count` values in total
597600
(replacements being defined as `new(x) !== x`).
598601
602+
!!! compat "Julia 1.7"
603+
Version 1.7 is required to replace elements of a `Tuple`.
604+
599605
# Examples
600606
```jldoctest
601607
julia> replace(x -> isodd(x) ? 2x : x, [1, 2, 3, 4])

0 commit comments

Comments
 (0)