Exemplo n.º 1
0
 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
Exemplo n.º 2
0
def compile(pattern, flags, code, groups, groupindex, indexgroup):
    import _cpython_sre
    return _cpython_sre.compile(pattern, flags, code, groups, groupindex,
                                indexgroup)
Exemplo n.º 3
0
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)