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

deprecate contains(eq, itr, item) #23716

Merged
merged 1 commit into from
Sep 15, 2017
Merged

deprecate contains(eq, itr, item) #23716

merged 1 commit into from
Sep 15, 2017

Conversation

JeffBezanson
Copy link
Sponsor Member

No description provided.

@JeffBezanson JeffBezanson added the deprecation This change introduces or involves a deprecation label Sep 14, 2017
@@ -1806,6 +1806,8 @@ import .Iterators.enumerate
return p
end

@deprecate contains(eq::Function, itr, x) any(y->eq(y,x), itr)
Copy link
Member

Choose a reason for hiding this comment

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

Huh, so that's what this method was for.

NEWS.md Outdated
@@ -443,6 +443,8 @@ Deprecated or removed
this is not true. If you are certain you need the old behavior, it is temporarily available
as `Base._isleaftype` ([#17086]).

* `contains(eq, itr, item)` is deprecated in favor of `any` with a predicate.
Copy link
Member

Choose a reason for hiding this comment

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

It'd be great if you could add the PR reference here.

Copy link
Member

@ararslan ararslan left a comment

Choose a reason for hiding this comment

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

LGTM aside from the minor NEWS item note.

@ararslan ararslan added the collections Data structures holding multiple items, e.g. sets label Sep 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
collections Data structures holding multiple items, e.g. sets deprecation This change introduces or involves a deprecation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants