Would defining MultiValueDictKeyError in django.core.exceptions be a good idea?

38 views
Skip to first unread message

Aditya Sarode

unread,
Sep 5, 2015, 8:24:29 AM9/5/15
to Django users
Hi,

MultiValueDictKeyError has to be imported from django.utils.datastructures now.
As a user, it was difficult to find the exact location of MultiValueDictKeyError. Importing it from django.core.exceptions would be easier from the user's perspective. I was curious to know if there was any specific reason for declaring it in django.utils.datastructures.py

Thank You,
Aditya

Tim Graham

unread,
Sep 5, 2015, 9:00:04 AM9/5/15
to Django users
The docs mention, "This is a subclass of Python's standard ``KeyError``, so you can stick to catching ``KeyError``." Does this work for you?
Reply all
Reply to author
Forward
0 new messages