def _real_re_compile(self, *args, **kwargs):
        """Thunk over to the original re.compile"""
        try:
            return _real_re_compile(*args, **kwargs)
        except re.error as e:
            # raise InvalidPattern instead of re.error as this gives a
            # cleaner message to the user.
            raise InvalidPattern('"' + args[0] + '" ' +str(e))
def _real_re_compile ( self , * args , ** kwargs ) : try : return _real_re_compile ( * args , ** kwargs ) except re . error as e : raise InvalidPattern ( '"' + args [ 0 ] + '" ' + str ( e ) )
Thunk over to the original re.compile