[issue33647] Add re.replace(string, replacement_map)

2018-05-26 Thread Paal Pedersen
Paal Pedersen added the comment: I forgot to put the ** in the input. This is to further explain what I had in mind: """The meaning of this file is to show how the replace function can be enhanced""" # Today the replace api takes at most 3 arguments, old_st

[issue33647] Make string.replace accept **kwargs instead of two arguments

2018-05-25 Thread Paal Pedersen
New submission from Paal Pedersen : It would be really nice if the python core function string.replace is modifed to accept **kwargs instead of 2 arguments. then you could just do: kwargs = {'my': 'yours', 'string': 'car'} >>>'