Part of bzrlib.globbing View In Hierarchy
The patterns and substitutions are combined into one, so the result of one replacement is never substituted again. Add the patterns and replacements via the add method and then call the object. The patterns must not contain capturing groups.
Method | __init__ | Undocumented |
Method | add | Add a pattern and replacement. |
Method | add_replacer | Add all patterns from another replacer. |
Method | __call__ | Undocumented |
Method | _do_sub | Undocumented |
The pattern must not contain capturing groups. The replacement might be either a string template in which & will be replaced with the match, or a function that will get the matching text as argument. It does not get match object, because capturing is forbidden anyway.