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

Added unique filter #469

Closed
wants to merge 1 commit into from
Closed

Added unique filter #469

wants to merge 1 commit into from

Conversation

@snoack
Copy link
Contributor

snoack commented Aug 4, 2015

4 years ago I suggested to add a unique filter, along with some other new filters as part of #66. That pull request has been closed, after some parts of it got implemented independently. However, I just saw a similar request (#443) for excluding duplicates using filters. So I rebased my old patch, added tests and did some logical improvements, that it hopefully get merged now.

@snoack snoack force-pushed the snoack:unique-filter branch from e4d9fff to e62f880 Aug 7, 2015
@snoack snoack mentioned this pull request Aug 7, 2015
@snoack snoack force-pushed the snoack:unique-filter branch from e62f880 to 0717c00 Aug 10, 2015
@snoack snoack force-pushed the snoack:unique-filter branch from 0717c00 to 4975ca0 Aug 10, 2015
@@ -51,21 +51,24 @@ def environmentfilter(f):
return f


def make_attrgetter(environment, attribute):
def make_attrgetter(environment, attribute, lowercase=False):

This comment has been minimized.

Copy link
@ThiefMaster

ThiefMaster Jan 29, 2017

Member

Does this really fit in this function? I'd rather have the option to pass an arbitrary postprocess callable that'll be applied before returning the attribute's value.

This comment has been minimized.

Copy link
@davidism

davidism Apr 13, 2017

Member

sort and dictsort use the name case_sensitive.

@@ -51,21 +51,24 @@ def environmentfilter(f):
return f


def make_attrgetter(environment, attribute):
def make_attrgetter(environment, attribute, lowercase=False):

This comment has been minimized.

Copy link
@davidism

davidism Apr 13, 2017

Member

sort and dictsort use the name case_sensitive.

key = getter(item)
if key not in seen:
seen.add(key)
rv.append(item)

This comment has been minimized.

Copy link
@davidism

davidism Apr 13, 2017

Member

This should yield item instead of building the full list ahead of time.

@davidism
Copy link
Member

davidism commented Apr 13, 2017

Needs a changelog entry.

@Talkless
Copy link

Talkless commented Apr 13, 2017

@snoack Are you yet interested in fixing this PR?

@davidism davidism mentioned this pull request Jul 5, 2017
@davidism
Copy link
Member

davidism commented Jul 5, 2017

Continued in #735

@davidism davidism closed this Jul 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.