[issue33647] Make string.replace accept a dict instead of two arguments
R. David Murray
report at bugs.python.org
Fri May 25 12:04:33 EDT 2018
R. David Murray <rdmurray at bitdance.com> added the comment:
That is not kwargs, that's a passing a dict. Which is what you would want, since the strings you want to replace might not be valid identifiers, and so couldn't be passed as keyword arguments.
I think I'm -0.5 on this. I don't think complicating the api is worth the benefit, given that you can already chain replace calls. (And note that before dicts became ordered by language definition this would have been a non-starter, which is probably also a mark against it.)
----------
nosy: +r.david.murray
title: Make string.replace accept **kwargs instead of two arguments -> Make string.replace accept a dict instead of two arguments
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33647>
_______________________________________
More information about the Python-bugs-list
mailing list