12 Apr
2012
12 Apr
'12
11:01 p.m.
Stefan Behnel wrote:
And str.replace() isn't the right interface for anything but a one-shot operation if the intention is to pass in a sequence of keywords.
So maybe a better approach would be to enhance maketrans so that both keys and replacements can be more than one character long? Behind the scenes, it could build a DFA or whatever is needed to do it efficiently. -- Greg