Skip to content

deprecate contains(eq, itr, item)#23716

Merged
JeffBezanson merged 1 commit into
masterfrom
jb/contains
Sep 15, 2017
Merged

deprecate contains(eq, itr, item)#23716
JeffBezanson merged 1 commit into
masterfrom
jb/contains

Conversation

@JeffBezanson

Copy link
Copy Markdown
Member

No description provided.

@JeffBezanson JeffBezanson added the deprecation This change introduces or involves a deprecation label Sep 14, 2017
Comment thread base/deprecated.jl
return p
end

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

Copy link
Copy Markdown
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.

Comment thread NEWS.md Outdated
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
Copy Markdown
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.

@ararslan ararslan left a comment

Copy link
Copy Markdown
Member

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