#28064: MultiValueDictKeyError double quotes missing str keys in error messages
--------------------------------------+--------------------------
Reporter: petedmarsh | Owner: nobody
Type: Bug | Status: assigned
Component: Utilities | Version: 1.11
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
--------------------------------------+--------------------------
With a builtin dict a KeyError error message looks like this:
{{{
>>> {}['key']
#...
KeyError: 'key'
}}}
However, with MultiValueDict the error message looks like this:
{{{
MultiValueDict()['key']
#...
django.utils.datastructures.MultiValueDictKeyError: "'key'"
}}}
I was a bit surprised when I first noticed this, as at first glance it
looked as if I had somehow quoted some keys ('key' rather than just
''key'') before looking them up in a dictionary.
--
Ticket URL: <https://code.djangoproject.com/ticket/28064>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/053.892a89fa1712b4656b8c96cf8483603c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.