/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/lazy_regex.py

  • Committer: Vincent Ladeuil
  • Date: 2011-07-06 09:22:00 UTC
  • mfrom: (6008 +trunk)
  • mto: (6012.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 6013.
  • Revision ID: v.ladeuil+lp@free.fr-20110706092200-7iai2mwzc0sqdsvf
MergingĀ inĀ trunk

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 compilation.
20
 
This allows overriding re.compile() to return lazily compiled objects.
 
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.
21
25
"""
22
26
 
23
27
import re
44
48
    def __init__(self, args=(), kwargs={}):
45
49
        """Create a new proxy object, passing in the args to pass to re.compile
46
50
 
47
 
        :param args: The *args to pass to re.compile
48
 
        :param kwargs: The **kwargs to pass to re.compile
 
51
        :param args: The `*args` to pass to re.compile
 
52
        :param kwargs: The `**kwargs` to pass to re.compile
49
53
        """
50
54
        self._real_regex = None
51
55
        self._regex_args = args