-
Notifications
You must be signed in to change notification settings - Fork 221
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
ext: add list.sort() #1021
ext: add list.sort() #1021
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
/gcbrun |
2ff4703
to
802efa8
Compare
/gcbrun |
@cezar-guimaraes I just had one more comment, but otherwise this is looking good. |
/gcbrun |
eb55f76
to
50e5a97
Compare
50e5a97
to
be89068
Compare
/gcbrun |
@cezar-guimaraes thanks for your contribution and your patience! |
I skipped creating an issue because this seemed like a small enough change to me, but please let me know if an issue is preferable.
This PR adds a
<list(T)>.sort() -> <list(T)>
member. T must implement(traits.Comparer)
.I believe that the check if the element type implements
traits.Comparer
only happens at runtime (how can I write tests for this?). An alternative implementation would create separate member overloads forlist(T), T in {set of comparable types}
similar to kube apiserver list extensionsLet me know if I should update the PR to create separate overloads.