[docs] [issue28612] str.translate needs a mapping example
report at bugs.python.org
Fri Dec 30 00:57:49 EST 2016
Serhiy Storchaka added the comment:
If the side effect of defaultdict is unpleasant, the correct way is combining the translation mapping with the custom mapping by ChainMap. But this example is too complex for the documentation of str.translate(). On other side, it is trivial for more experience users and don't need special mentioning.
I think other resources (ActiveState Code Reciepes  or books) are better places for this example.
Python tracker <report at bugs.python.org>
More information about the docs