Part of bzrlib
This module defines a class which creates proxy objects for regex compilation. This allows overriding re.compile() to return lazily compiled objects.
We do this rather than just providing a new interface so that it will also be used by existing Python modules that create regexs.
Class | LazyRegex | A proxy around a real regex, which won't be compiled until accessed. |
Function | lazy_compile | Create a proxy object which will compile the regex on demand. |
Function | install_lazy_compile | Make lazy_compile the default compile mode for regex compilation. |
Function | reset_compile | Restore the original function to re.compile(). |
Returns | a LazyRegex proxy object. |