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

filter is deprecated, but does not give a deprecation warning #21334

Closed
dpsanders opened this issue Apr 9, 2017 · 5 comments
Closed

filter is deprecated, but does not give a deprecation warning #21334

dpsanders opened this issue Apr 9, 2017 · 5 comments

Comments

@dpsanders
Copy link
Contributor

Using filter gives no deprecation warning:

  | | |_| | | | (_| |  |  Version 0.6.0-pre.beta.83 (2017-04-08 21:57 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 965c938eb* (0 days old master)
|__/                   |  x86_64-apple-darwin16.0.0

julia> v = [1, 2, 3, 4, 5]
5-element Array{Int64,1}:
 1
 2
 3
 4
 5

julia> filter(x->x>3, v)
2-element Array{Int64,1}:
 4
 5
@yuyichao
Copy link
Contributor

yuyichao commented Apr 9, 2017

I don't think it's deprecated.

@yuyichao yuyichao closed this as completed Apr 9, 2017
@yuyichao
Copy link
Contributor

yuyichao commented Apr 9, 2017

Ref #18839 (comment)

  • I separated Base.filter and IterTools.filter into two functions (since the latter is lazy and the former is eager). This is up for debate.

@dpsanders
Copy link
Contributor Author

As far as I understand, filter was moved to Iterators.filter:

https://github.com/JuliaLang/julia/blob/master/base/deprecated.jl#L383

@yuyichao
Copy link
Contributor

yuyichao commented Apr 9, 2017

See my comment above. Base.filter and Iterators.filter (IterTools.filter in the first version of the linked PR) are two different functions. The deprecation was only added so that the separated function can still be used from Base.filter with a depwarn. Other methods are NOT deprecated.

@dpsanders
Copy link
Contributor Author

OK thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants