This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients ChrisBarker, Gaurav Tatke, Jim.Jewett, docs@python, rhettinger, serhiy.storchaka
Date 2016-12-30.05:57:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1483077469.37.0.75078631136.issue28612@psf.upfronthosting.co.za>
In-reply-to
Content
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 [1] or books) are better places for this example.

[1] http://code.activestate.com/recipes/popular/
History
Date User Action Args
2016-12-30 05:57:49serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, docs@python, Jim.Jewett, ChrisBarker, Gaurav Tatke
2016-12-30 05:57:49serhiy.storchakasetmessageid: <1483077469.37.0.75078631136.issue28612@psf.upfronthosting.co.za>
2016-12-30 05:57:49serhiy.storchakalinkissue28612 messages
2016-12-30 05:57:49serhiy.storchakacreate