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

Drop support for non-indexable iterators in find* functions #26095

Merged
merged 2 commits into from
Feb 19, 2018

Conversation

nalimilan
Copy link
Member

Always call pairs, which will throw an error for iterables which do not define it. Removing the internal _pairs function allows supporting custom types which implement pairs. Also fix/improve a few docstrings.

No deprecation is needed since these functions relied on getindex being defined on 0.6.

Fixes #25999.

Always call pairs(), which will throw an error for iterables which
do not define it. Removing the internal _pairs() function allows
supporting custom types which implement pairs().

Also fix/improve a few docstrings.
@nalimilan nalimilan added the search & find The find* family of functions label Feb 17, 2018
base/array.jl Outdated

Find the next linear index >= `i` of a `true` element of `A`, or `nothing` if not found.
Find the next index after `i` of a `true` element of `A`, or `nothing` if not found.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After or including i.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@JeffBezanson JeffBezanson merged commit e6c6ea7 into master Feb 19, 2018
@JeffBezanson JeffBezanson deleted the nl/_pairs branch February 19, 2018 16:42
vtjnash referenced this pull request Feb 20, 2018
require: factor out method taking a PkgId argument
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
search & find The find* family of functions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

find* functions and pairs()/keys()
3 participants