Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#2441 closed enhancement (fixed)

[patch] Allow MultiValueDict update method to take keyword args, like dict

Reported by: Pete Shinners <pete@…> Owned by: adrian
Component: contrib.admin Version: master
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

In Python 2.4 the builtin dict.update method can accept keyword args. This is a small update to MultiValueKey.update to also optionally accept keywork arguments. Also, like the python dict implementation, this allows both a dictionary (or MultiValueDict) alongside keyword arguments.

Attachments (1)

multivalueupdate.diff (1.8 KB) - added by Pete Shinners <pete@…> 9 years ago.
Patch for MultiValueDict.update

Download all attachments as: .zip

Change History (3)

Changed 9 years ago by Pete Shinners <pete@…>

Patch for MultiValueDict.update

comment:1 Changed 9 years ago by Pete Shinners <pete@…>

  • Summary changed from [patch] Allow MultiValueKey update method to take keyword args, like dict to [patch] Allow MultiValueDict update method to take keyword args, like dict
last_post.replace("MultiValueKey", "MultiValueDict")

comment:2 Changed 9 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(In [3692]) Fixed #2441 -- Improved MultiValueDict.update() to take keyword args, like Python 2.4 built-in dict. Thanks for the patch, Pete Shinners

Note: See TracTickets for help on using tickets.
Back to Top