def _build_editable_options(req):
 regexp = re.compile('[\\?#&](?P<name>[^&=]+)=(?P<value>[^&=]+)')
 matched = regexp.findall(req)
 if matched:
  ret = dict()
  for option in matched:
   (name, value) = option
   if (name in ret):
    raise Exception(('%s option already defined' % name))
   ret[name] = value
  return ret
 return None

def _build_editable_options ( req ) : regexp = re . compile ( '[\\?#&](?P<name>[^&=]+)=(?P<value>[^&=]+)' ) matched = regexp . findall ( req ) if matched : ret = dict ( ) for option in matched : ( name , value ) = option if ( name in ret ) : raise Exception ( ( '%s option already defined' % name ) ) ret [ name ] = value return ret return None
this method generates a dictionary of the query string parameters contained in a given editable url .