Code

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#13042 closed (invalid)

QueryDict documentation doesn't include .keys() or .iterkeys() entries

Reported by: schwanksta Owned by: nobody
Component: Documentation Version: 1.1
Severity: Keywords: querydict keys documentation
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

I was checking to see if a QueryDict had a .keys() or .iterkeys() method, but the documentation (http://docs.djangoproject.com/en/dev/ref/request-response/#querydict-objects) only lists .items() and .iteritems(). Thinking that this would be a weird omission, I decided to check myself:

>>> qd = QueryDict('a=1&b=2')
>>> qd
<QueryDict: {u'a': [u'1'], u'b': [u'2']}>
>>> qd.keys()
[u'a', u'b']
>>> qd.iterkeys()
<dictionary-keyiterator object at 0xb467ee0>

As you can see, the methods exist, but they're just missing from the docs.

Attachments (0)

Change History (2)

comment:1 Changed 4 years ago by ubernostrum

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

The documentation says that QueryDict implements all the standard dictionary methods, and then says that only the methods which differ from standard dictionary behavior will be documented.

comment:2 Changed 4 years ago by schwanksta

Whoops, must have skipped over that line. Thanks.

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.