Skip to content

Commit 97d86aa

Browse files
yurivishKristofferC
authored andcommitted
Fix enumerate documentation (#30398)
The `enumerate` method referred to in the current definition no longer exists and has been deprecated to a method of `pairs` in 0.7. Thanks to @simonschoelly for pointing this out. ``` julia> using OffsetArrays; julia> pairs(IndexLinear(),OffsetArray(1:5, -2:2)) pairs(::OffsetArray{Int64,1,UnitRange{Int64}}) with 5 entries: -2 => 1 -1 => 2 0 => 3 1 => 4 2 => 5 ``` (cherry picked from commit 549240a)
1 parent 6e7a4c8 commit 97d86aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/iterators.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ and `x` is the `i`th value from the given iterator. It's useful when
115115
you need not only the values `x` over which you are iterating, but
116116
also the number of iterations so far. Note that `i` may not be valid
117117
for indexing `iter`; it's also possible that `x != iter[i]`, if `iter`
118-
has indices that do not start at 1. See the `enumerate(IndexLinear(),
118+
has indices that do not start at 1. See the `pairs(IndexLinear(),
119119
iter)` method if you want to ensure that `i` is an index.
120120
121121
# Examples

0 commit comments

Comments
 (0)