class documentation

All-in-one multiple-string-substitution class Example usage: text = "Larry Wall is the creator of Perl" adict = { "Larry Wall" : "Guido van Rossum", "creator" : "Benevolent Dictator for Life", "Perl" : "Python", } print multiple_replace(adict, text) xlat = Xlator(adict) print xlat.xlat(text)

Method __call__ Handler invoked for each regex match
Method xlat Translate text, returns the modified text.
Method _make_regex Build re object based on the keys of the current dictionary
def __call__(self, match): (source)

Handler invoked for each regex match

def xlat(self, text): (source)

Translate text, returns the modified text.

def _make_regex(self): (source)

Build re object based on the keys of the current dictionary