@@ -126,7 +126,7 @@ The :mod:`urlparse` module defines the following functions:
126
126
Added IPv6 URL parsing capabilities.
127
127
128
128
129
- .. function :: parse_qs(qs[, keep_blank_values[, strict_parsing]])
129
+ .. function :: parse_qs(qs[, keep_blank_values[, strict_parsing[, max_num_fields] ]])
130
130
131
131
Parse a query string given as a string argument (data of type
132
132
:mimetype: `application/x-www-form-urlencoded `). Data are returned as a
@@ -143,14 +143,20 @@ The :mod:`urlparse` module defines the following functions:
143
143
parsing errors. If false (the default), errors are silently ignored. If true,
144
144
errors raise a :exc: `ValueError ` exception.
145
145
146
+ The optional argument *max_num_fields * is a flag for the maximum number of
147
+ fields to read. If set, then throws a :exc: `ValueError ` if there are more
148
+ than *max_num_fields * fields read. Default is *None *.
149
+
146
150
Use the :func: `urllib.urlencode ` function to convert such dictionaries into
147
151
query strings.
148
152
149
153
.. versionadded :: 2.6
150
154
Copied from the :mod: `cgi ` module.
151
155
156
+ .. versionchanged :: 2.7.16
157
+ Added *max_num_fields * param.
152
158
153
- .. function :: parse_qsl(qs[, keep_blank_values[, strict_parsing]])
159
+ .. function :: parse_qsl(qs[, keep_blank_values[, strict_parsing[, max_num_fields] ]])
154
160
155
161
Parse a query string given as a string argument (data of type
156
162
:mimetype: `application/x-www-form-urlencoded `). Data are returned as a list of
@@ -166,12 +172,18 @@ The :mod:`urlparse` module defines the following functions:
166
172
parsing errors. If false (the default), errors are silently ignored. If true,
167
173
errors raise a :exc: `ValueError ` exception.
168
174
175
+ The optional argument *max_num_fields * is a flag for the maximum number of
176
+ fields to read. If set, then throws a :exc: `ValueError ` if there are more
177
+ than *max_num_fields * fields read. Default is *None *.
178
+
169
179
Use the :func: `urllib.urlencode ` function to convert such lists of pairs into
170
180
query strings.
171
181
172
182
.. versionadded :: 2.6
173
183
Copied from the :mod: `cgi ` module.
174
184
185
+ .. versionchanged :: 2.7.16
186
+ Added *max_num_fields * param.
175
187
176
188
.. function :: urlunparse(parts)
177
189
0 commit comments