Opened 18 years ago
Closed 18 years ago
#4040 closed (fixed)
make use of in instead of has_key()
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Core (Other) | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
has_key()
is slower and will be going away in python3.
Attachments (1)
Change History (6)
by , 18 years ago
comment:1 by , 18 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
There are a couple has_key() calls in dispatcher package, but I wasn't sure if we are keeping that in sync with upstream or not. All tests passed for me, but I wouldn't be surprised if not all the changes are covered by a test.
comment:2 by , 18 years ago
Triage Stage: | Design decision needed → Ready for checkin |
---|
I think this would be good to get in for future proofing reasons (and speed!). Shouldn't raise any bugs that I can think of.
comment:3 by , 18 years ago
Triage Stage: | Ready for checkin → Accepted |
---|
Does this depend on #4041 at all? It's not clear what the relationship is between this ticket and that one? Moving back to "accepted" until that is clarified.
This is pretty low priority, since the speed difference between the two versions is tiny for all practical purposes and Python 3000 doesn't exist yet (and will require more than one or two changes to our code). However, it's probably worth putting in at some point.
comment:4 by , 18 years ago
This ticket is independent of #4041 since Django itself doesn't actually use the cache framework (except for in the tests, but there is no use of 'in' in the cache tests).
comment:5 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
replaced most has_key()'s with in