Code

Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#1131 closed defect (fixed)

Add a __repr__ to MultiValueDict

Reported by: Simon Willison Owned by: adrian
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: UI/UX:

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)

Attachments (0)

Change History (1)

comment:1 Changed 9 years ago by adrian

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

(In [1789]) Fixed #1131 -- Added repr() to MultiValueDict. Thanks, Simon

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.