def __init__(self, flags=<NUM_LIT:0>, **kw):
if isinstance(flags, str):<EOL><INDENT>flags = flags.upper()<EOL>if flags.translate(None, '<STR_LIT>'):<EOL><INDENT>raise ValueError('<STR_LIT>' + flags.translate(None, '<STR_LIT>'))<EOL><DEDENT>flags = reduce(lambda i, flag: i | getattr(re, flag), flags, <NUM_LIT:0>)<EOL><DEDENT>super(RegEx, self).__init__(**kw)<EOL>self.kw['<STR_LIT>'] = flags<EOL>
flags should be an integer and is passed to re.compile. It can 
        also be a string of one or more of the letters 'iLmsux' (the short 
        names of the re flags).