#1131 closed defect (fixed)
Add a __repr__ to MultiValueDict
| Reported by: | Simon Willison | Owned by: | Adrian Holovaty |
|---|---|---|---|
| Component: | Core (Other) | Version: | |
| Severity: | trivial | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
At the moment, MultiValueDict inherits its repr from Python's dictionary type. This is confusing, as it leads to the misunderstanding demonstrated in #1130. We should add a custom repr something like this:
def __repr__(self):
return "<MultiValueDict: %s>" % dict.__repr__(self)
Note:
See TracTickets
for help on using tickets.
(In [1789]) Fixed #1131 -- Added repr() to MultiValueDict. Thanks, Simon