Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
68f32371
Commit
68f32371
authored
Oct 30, 2018
by
matthewbelisle-wf
Committed by
Victor Stinner
Oct 30, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-35116, urllib.parse: Document the new max_num_fields parameter (GH-10247)
parent
a80af770
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
Doc/library/urllib.parse.rst
Doc/library/urllib.parse.rst
+16
-2
No files found.
Doc/library/urllib.parse.rst
View file @
68f32371
...
...
@@ -137,7 +137,7 @@ or on combining URL components into a URL string.
returning :const:`None`.
.. function:: parse_qs(qs, keep_blank_values=False, strict_parsing=False, encoding='utf-8', errors='replace')
.. function:: parse_qs(qs, keep_blank_values=False, strict_parsing=False, encoding='utf-8', errors='replace'
, max_num_fields=None
)
Parse a query string given as a string argument (data of type
:mimetype:`application/x-www-form-urlencoded`). Data are returned as a
...
...
@@ -158,6 +158,10 @@ or on combining URL components into a URL string.
percent-encoded sequences into Unicode characters, as accepted by the
:meth:`bytes.decode` method.
The optional argument *max_num_fields* is the maximum number of fields to
read. If set, then throws a :exc:`ValueError` if there are more than
*max_num_fields* fields read.
Use the :func:`urllib.parse.urlencode` function (with the ``doseq``
parameter set to ``True``) to convert such dictionaries into query
strings.
...
...
@@ -166,8 +170,11 @@ or on combining URL components into a URL string.
.. versionchanged:: 3.2
Add *encoding* and *errors* parameters.
.. versionchanged:: 3.8
Added *max_num_fields* parameter.
.. function:: parse_qsl(qs, keep_blank_values=False, strict_parsing=False, encoding='utf-8', errors='replace')
.. function:: parse_qsl(qs, keep_blank_values=False, strict_parsing=False, encoding='utf-8', errors='replace'
, max_num_fields=None
)
Parse a query string given as a string argument (data of type
:mimetype:`application/x-www-form-urlencoded`). Data are returned as a list of
...
...
@@ -187,12 +194,19 @@ or on combining URL components into a URL string.
percent-encoded sequences into Unicode characters, as accepted by the
:meth:`bytes.decode` method.
The optional argument *max_num_fields* is the maximum number of fields to
read. If set, then throws a :exc:`ValueError` if there are more than
*max_num_fields* fields read.
Use the :func:`urllib.parse.urlencode` function to convert such lists of pairs into
query strings.
.. versionchanged:: 3.2
Add *encoding* and *errors* parameters.
.. versionchanged:: 3.8
Added *max_num_fields* parameter.
.. function:: urlunparse(parts)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment