Skip to content

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

Closed
@dpsanders

Description

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

Activity

yuyichao

yuyichao commented on Apr 9, 2017

@yuyichao
Contributor

I don't think it's deprecated.

yuyichao

yuyichao commented on Apr 9, 2017

@yuyichao
Contributor

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

dpsanders commented on Apr 9, 2017

@dpsanders
ContributorAuthor

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

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

yuyichao

yuyichao commented on Apr 9, 2017

@yuyichao
Contributor

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

dpsanders commented on Apr 9, 2017

@dpsanders
ContributorAuthor

OK thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      filter is deprecated, but does not give a deprecation warning · Issue #21334 · JuliaLang/julia