Opened 7 years ago
Last modified 4 years ago
#12684 closed enhancement
_RequestArgs.get should alias getfirst — at Version 2
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Milestone: | 1.3.2 |
Component: | general | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: |
Fixed exceptions due to |
||
API Changes: |
|
||
Internal Changes: |
Description (last modified by )
Discussed in #12682, to make the API more pythonic and to fix issues like the one seen in #12682, req.args.get
should return a string rather than a string or list. If a list is expected req.args.getlist
should be used.
_RequestArgs.getbinary
will be added, as a shorthand for: req.args.getint('key', default, min=0, max=1)
.
The as_
methods of _RequestArgs
should be modified/extended to be consistent with the changes.
Code in query.py
can also be refactored to use _RequestArgs
: trunk/trac/ticket/query.py@15573:949-971#L948.
Change History (2)
comment:1 by , 7 years ago
Description: | modified (diff) |
---|
Proposed changes in log:rjollos.git:t12684_alias_getfirst.