~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lazy_regex.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-01-11 19:11:29 UTC
  • mfrom: (5555.3.1 local_work)
  • Revision ID: pqm@pqm.ubuntu.com-20110111191129-qxzw738fmkm0run9
(vila) Add icons for tbzrcommand (iwata)

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Lazily compiled regex objects.
18
18
 
19
 
This module defines a class which creates proxy objects for regex
20
 
compilation.  This allows overriding re.compile() to return lazily compiled
21
 
objects.  
22
 
 
23
 
We do this rather than just providing a new interface so that it will also
24
 
be used by existing Python modules that create regexs.
 
19
This module defines a class which creates proxy objects for regex compilation.
 
20
This allows overriding re.compile() to return lazily compiled objects.
25
21
"""
26
22
 
27
23
import re
48
44
    def __init__(self, args=(), kwargs={}):
49
45
        """Create a new proxy object, passing in the args to pass to re.compile
50
46
 
51
 
        :param args: The `*args` to pass to re.compile
52
 
        :param kwargs: The `**kwargs` to pass to re.compile
 
47
        :param args: The *args to pass to re.compile
 
48
        :param kwargs: The **kwargs to pass to re.compile
53
49
        """
54
50
        self._real_regex = None
55
51
        self._regex_args = args