@@ -126,7 +126,7 @@ The :mod:`urlparse` module defines the following functions:
126126 Added IPv6 URL parsing capabilities.
127127
128128
129- .. function :: parse_qs(qs[, keep_blank_values[, strict_parsing]])
129+ .. function :: parse_qs(qs[, keep_blank_values[, strict_parsing[, max_num_fields] ]])
130130
131131 Parse a query string given as a string argument (data of type
132132 :mimetype: `application/x-www-form-urlencoded `). Data are returned as a
@@ -143,14 +143,20 @@ The :mod:`urlparse` module defines the following functions:
143143 parsing errors. If false (the default), errors are silently ignored. If true,
144144 errors raise a :exc: `ValueError ` exception.
145145
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+
146150 Use the :func: `urllib.urlencode ` function to convert such dictionaries into
147151 query strings.
148152
149153 .. versionadded :: 2.6
150154 Copied from the :mod: `cgi ` module.
151155
156+ .. versionchanged :: 2.7.16
157+ Added *max_num_fields * param.
152158
153- .. function :: parse_qsl(qs[, keep_blank_values[, strict_parsing]])
159+ .. function :: parse_qsl(qs[, keep_blank_values[, strict_parsing[, max_num_fields] ]])
154160
155161 Parse a query string given as a string argument (data of type
156162 :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:
166172 parsing errors. If false (the default), errors are silently ignored. If true,
167173 errors raise a :exc: `ValueError ` exception.
168174
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+
169179 Use the :func: `urllib.urlencode ` function to convert such lists of pairs into
170180 query strings.
171181
172182 .. versionadded :: 2.6
173183 Copied from the :mod: `cgi ` module.
174184
185+ .. versionchanged :: 2.7.16
186+ Added *max_num_fields * param.
175187
176188.. function :: urlunparse(parts)
177189
0 commit comments