def valid_path(value):
 value.encode('ascii')
 if (not (value and (value[0] == '/'))):
  return False
 if (not Definitions.PATH_RE.match(value)):
  return False
 return True

def valid_path ( value ) : value . encode ( 'ascii' ) if ( not ( value and ( value [ 0 ] == '/' ) ) ) : return False if ( not Definitions . PATH_RE . match ( value ) ) : return False return True
validate a cookie path ascii string .