'Create new instance of Rule(regex, types, attrs, stop)'

def __new__(_cls, regexes, types=None, stop=False, **kwargs):

    if isinstance(regexes, str):
        regexes = set([regexes])
    regexes = set((regexes or []))
    if isinstance(types, str):
        types = set([types])
    types = set((types or []))
    return tuple.__new__(_cls, (regexes, types, stop, kwargs))
