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

Feature request: natsorted() should support the key= argument #1

Closed
pwaller opened this issue Jun 22, 2013 · 2 comments
Closed

Feature request: natsorted() should support the key= argument #1

pwaller opened this issue Jun 22, 2013 · 2 comments
Labels

Comments

@pwaller
Copy link

pwaller commented Jun 22, 2013

The first thing I tried to do was to sort a list of objects by their name.

x = natsorted(y, key=lambda o: o.name)

I think this would be a useful addition. The only change that's needed is that natsorted should pass key=lambda o: natsorted(key(o)) to sorted.

@SethMMorton
Copy link
Owner

I have added this feature in the newest update, version 2.2.0. Thanks for your suggestion!

@pwaller
Copy link
Author

pwaller commented Jun 26, 2013

🤘 :)

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

No branches or pull requests

2 participants