Skip to content

Conversation

aplavin
Copy link
Contributor

@aplavin aplavin commented Aug 4, 2023

#32968 added filter(Tuple), here I also extend it to NamedTuple
Closes #43473.

Typestable when possible, eg

julia> @code_warntype filter(x -> x isa Number, (a=1, b="2", c=3.))
<...>
Body::NamedTuple{(:a, :c), Tuple{Int64, Float64}}
<...>

@brenhinkeller brenhinkeller added the feature Indicates new feature / enhancement requests label Aug 4, 2023
@aplavin
Copy link
Contributor Author

aplavin commented Aug 16, 2023

bump!

@oscardssmith oscardssmith added the triage This should be discussed on a triage call label Aug 20, 2023
@aplavin
Copy link
Contributor Author

aplavin commented Sep 16, 2023

bump

@timholy
Copy link
Member

timholy commented Sep 16, 2023

The tests all fail 🙂

@aplavin
Copy link
Contributor Author

aplavin commented Sep 29, 2023

bump...
Also, does the triage label correspond to questioning this specific implementation, or adding this method in general?

@aplavin
Copy link
Contributor Author

aplavin commented Oct 19, 2023

bump

@aplavin
Copy link
Contributor Author

aplavin commented Dec 4, 2023

Gentle bump...

@oscardssmith
Copy link
Member

This implementation looks correct so the only question is if filter makes sense for namedtuple. Sorry for forgetting about this for so long. @LilithHafner can we make sure this gets on the next triage agenda?

@LilithHafner
Copy link
Member

Given that we have this for tuples, triage agrees that we should also have it for named tuples.

@LilithHafner LilithHafner removed the triage This should be discussed on a triage call label Dec 21, 2023
@aplavin
Copy link
Contributor Author

aplavin commented Feb 1, 2024

Anything I need to do on my side? Triage approved more than a month ago, but this doesn't seem present in recent Julia builds.

@LilithHafner LilithHafner added the merge me PR is reviewed. Merge when all tests are passing label Feb 1, 2024
@LilithHafner
Copy link
Member

Nothing on your end, sorry we abandoned this. LGTM

@LilithHafner LilithHafner changed the title add filter(namedtuple) Add filter(::NamedTuple) Feb 2, 2024
@LilithHafner LilithHafner changed the title Add filter(::NamedTuple) Add filter(f, ::NamedTuple) Feb 2, 2024
@LilithHafner LilithHafner merged commit f2e168a into JuliaLang:master Feb 2, 2024
@LilithHafner LilithHafner removed the merge me PR is reviewed. Merge when all tests are passing label Feb 2, 2024
@LilithHafner
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Indicates new feature / enhancement requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

filter a NamedTuple
6 participants