Opened 18 years ago
Closed 18 years ago
#2620 closed defect (fixed)
Two-argument form of MergeDict.get() fails
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Metasystem | Version: | |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
django.utils.datastructures.MergeDict does not behave completely like a Python intrinsic dict, because the get() method cannot be called without a default argument.
TypeError: get() takes exactly 3 arguments (2 given)
Attached is a patch which fixes this, and adds a unit test for MergeDict.
Attachments (2)
Change History (7)
by , 18 years ago
Attachment: | 2620.patch added |
---|
comment:1 by , 18 years ago
Summary: | [patch] Two-argument form of MergeDict.get() fails → Two-argument form of MergeDict.get() fails |
---|
comment:2 by , 18 years ago
Patch needs improvement: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
Yea this annoys me too.
comment:3 by , 18 years ago
It doesn't really need a unit test: the fix is dead easy and backwards compatible.
by , 18 years ago
Attachment: | mergedict_get.patch added |
---|
comment:4 by , 18 years ago
Has patch: | set |
---|---|
Patch needs improvement: | unset |
Triage Stage: | Accepted → Ready for checkin |
comment:5 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
The patch doesn't appear to fix this entirely, and it doesn't include a unit test as you suggest. Are you sure you uploaded the right patch?