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 ben.knight
Recipients ben.knight
Date 2016-03-01.13:51:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Python 3.5.1 x86-64, Windows 10

I created a translation map that translated some characters to None and others to strings and found that in some cases str.translate() will duplicate one of the untranslated characters in the returned string.

How to reproduce:

table = str.maketrans({'a': None, 'b': 'cd'})

Expected result:


Actual result:


Mapping 'a' to '' instead of None will produce the desired effect.
Date User Action Args
2016-03-01 13:51:44ben.knightsetrecipients: + ben.knight
2016-03-01 13:51:44ben.knightsetmessageid: <>
2016-03-01 13:51:43ben.knightlinkissue26464 messages
2016-03-01 13:51:43ben.knightcreate