Opened 15 years ago
Closed 14 years ago
#12746 closed (fixed)
Use key argument in sort calls
Reported by: | Martin v. Löwis | Owned by: | nobody |
---|---|---|---|
Component: | Uncategorized | Version: | 1.2-alpha |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Now that Python 2.4 is the minimum supported version, it is possible to replace all comparison functions with key functions. The attached patch does that.
Doing so has two advantages:
- it may be slightly faster, in particular, if the comparing the key values is faster than calling the cmp function
- it helps moving Django towards Python 3, which doesn't support the compare function anymore.
With the patch, I don't get any additional failures when testing on trunk.
Attachments (1)
Change History (5)
by , 15 years ago
comment:1 by , 15 years ago
Triage Stage: | Unreviewed → Ready for checkin |
---|
comment:2 by , 15 years ago
comment:3 by , 15 years ago
http://docs.djangoproject.com/en/dev/internals/contributing/#ticket-triage has a picture and some description of Django's process. You weren't expected to check it in yourself, Alex setting it ready for checkin is just a way to signal he has reviewed it and thinks it's ready.
comment:4 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
As this is my first Django contribution, I'm not sure what is supposed to happen next. Notice that I don't have commit privileges, so I couldn't check that in myself.