def _setoption(wmod, arg):
parts = arg.split("<STR_LIT::>")<EOL>if len(parts) > <NUM_LIT:5>:<EOL><INDENT>raise wmod._OptionError("<STR_LIT>" % (arg,))<EOL><DEDENT>while len(parts) < <NUM_LIT:5>:<EOL><INDENT>parts.append("<STR_LIT>")<EOL><DEDENT>action, message, category, module, lineno = [s.strip() for s in parts]<EOL>action = wmod._getaction(action)<EOL>category = wmod._getcategory(category)<EOL>if lineno:<EOL><INDENT>try:<EOL><INDENT>lineno = int(lineno)<EOL>if lineno < <NUM_LIT:0>:<EOL><INDENT>raise ValueError<EOL><DEDENT><DEDENT>except (ValueError, OverflowError):<EOL><INDENT>raise wmod._OptionError("<STR_LIT>" % (lineno,))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>lineno = <NUM_LIT:0><EOL><DEDENT>wmod.filterwarnings(action, message, category, module, lineno)<EOL>
Copy of the warning._setoption function but does not escape arguments.