def __compile_cpython_sre(self): if not self.__compiled_sre_pattern: global _cpython_sre if not _cpython_sre: import _cpython_sre self.__compiled_sre_pattern = _cpython_sre.compile( self.pattern, self.flags, self.code, self.num_groups, self.groupindex, self.indexgroup) return self.__compiled_sre_pattern
def compile(pattern, flags, code, groups, groupindex, indexgroup): import _cpython_sre return _cpython_sre.compile(pattern, flags, code, groups, groupindex, indexgroup)
def compile(pattern, flags, code, groups, groupindex, indexgroup): from build_capi import hint with hint("_cpython_sre"): import _cpython_sre return _cpython_sre.compile(pattern, flags, code, groups, groupindex, indexgroup)