Opened 6 months ago
Last modified 6 months ago
#36278 closed New feature
MultiValueDict should use sentinel for default values — at Initial Version
Reported by: | Peter Larsen - Puzzel Solutions | Owned by: | |
---|---|---|---|
Component: | Utilities | Version: | dev |
Severity: | Normal | Keywords: | MultiValueDict getlist default |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
MultiValueDict has many methods that has a 'default' parameter, but sets the default to None. fx:
https://github.com/django/django/blob/main/django/utils/datastructures.py#L147
This makes
mvdict.getlist('key', None)
return [], instead of the expected None.
Note:
See TracTickets
for help on using tickets.