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 |
Build re object based on the keys of the current dictionary |