def parse_querystring(environ):
 source = environ.get('QUERY_STRING', '')
 if (not source):
  return []
 if ('paste.parsed_querystring' in environ):
  (parsed, check_source) = environ['paste.parsed_querystring']
  if (check_source == source):
   return parsed
 parsed = cgi.parse_qsl(source, keep_blank_values=True, strict_parsing=False)
 environ['paste.parsed_querystring'] = (parsed, source)
 return parsed

def parse_querystring ( environ ) : source = environ . get ( 'QUERY_STRING' , '' ) if ( not source ) : return [ ] if ( 'paste.parsed_querystring' in environ ) : ( parsed , check_source ) = environ [ 'paste.parsed_querystring' ] if ( check_source == source ) : return parsed parsed = cgi . parse_qsl ( source , keep_blank_values = True , strict_parsing = False ) environ [ 'paste.parsed_querystring' ] = ( parsed , source ) return parsed
parses a query string into a list like [] .