@@ -612,6 +612,7 @@ def unquote(string, encoding='utf-8', errors='replace'):
612612 append (bits [i + 1 ])
613613 return '' .join (res )
614614
615+
615616def parse_qs (qs , keep_blank_values = False , strict_parsing = False ,
616617 encoding = 'utf-8' , errors = 'replace' ):
617618 """Parse a query given as a string argument.
@@ -633,6 +634,8 @@ def parse_qs(qs, keep_blank_values=False, strict_parsing=False,
633634
634635 encoding and errors: specify how to decode percent-encoded sequences
635636 into Unicode characters, as accepted by the bytes.decode() method.
637+
638+ Returns a dictionary.
636639 """
637640 parsed_result = {}
638641 pairs = parse_qsl (qs , keep_blank_values , strict_parsing ,
@@ -644,28 +647,29 @@ def parse_qs(qs, keep_blank_values=False, strict_parsing=False,
644647 parsed_result [name ] = [value ]
645648 return parsed_result
646649
650+
647651def parse_qsl (qs , keep_blank_values = False , strict_parsing = False ,
648652 encoding = 'utf-8' , errors = 'replace' ):
649653 """Parse a query given as a string argument.
650654
651- Arguments:
655+ Arguments:
652656
653- qs: percent-encoded query string to be parsed
657+ qs: percent-encoded query string to be parsed
654658
655- keep_blank_values: flag indicating whether blank values in
656- percent-encoded queries should be treated as blank strings. A
657- true value indicates that blanks should be retained as blank
658- strings. The default false value indicates that blank values
659- are to be ignored and treated as if they were not included.
659+ keep_blank_values: flag indicating whether blank values in
660+ percent-encoded queries should be treated as blank strings.
661+ A true value indicates that blanks should be retained as blank
662+ strings. The default false value indicates that blank values
663+ are to be ignored and treated as if they were not included.
660664
661- strict_parsing: flag indicating what to do with parsing errors. If
662- false (the default), errors are silently ignored. If true,
663- errors raise a ValueError exception.
665+ strict_parsing: flag indicating what to do with parsing errors. If
666+ false (the default), errors are silently ignored. If true,
667+ errors raise a ValueError exception.
664668
665- encoding and errors: specify how to decode percent-encoded sequences
666- into Unicode characters, as accepted by the bytes.decode() method.
669+ encoding and errors: specify how to decode percent-encoded sequences
670+ into Unicode characters, as accepted by the bytes.decode() method.
667671
668- Returns a list, as G-d intended.
672+ Returns a list, as G-d intended.
669673 """
670674 qs , _coerce_result = _coerce_args (qs )
671675 pairs = [s2 for s1 in qs .split ('&' ) for s2 in s1 .split (';' )]
0 commit comments