[merge] lazy regex
Martin Pool
mbp at canonical.com
Tue Oct 10 07:25:14 BST 2006
On 10 Oct 2006, Andrew Bennetts <andrew at canonical.com> wrote:
> Martin Pool wrote:
> > On 9 Oct 2006, John Arbash Meinel <john at arbash-meinel.com> wrote:
> [...]
> > > +
> > > +_real_re_compile = re.compile
> >
> > I'm not sure if it's justified, but I feel I'd like an
> >
> > assert _real_re_compile is not lazy_compile
>
> Given that this assignment happens before lazy_compile is defined, I'd say it
> isn't justified ;)
Sheesh, obviously this is a suggestion, not a patch.
if re.compile is lazy_compile:
import warnings
warnings.warn("lazy_compile is already installed")
_real_re_compile = re.compile
--
Martin
More information about the bazaar
mailing list