Author eryksun
Recipients ben.knight, eryksun, serhiy.storchaka
Date 2016-03-01.16:31:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
It duplicates translated characters as well. For example:

    >>> table = str.maketrans('mnopqrb', 'rqponm\u0100', 'a')
    >>> 'aaaaaamnopqrb'.translate(table)

3.4 returns the correct result:

    >>> table = str.maketrans('mnopqrb', 'rqponm\u0100', 'a')
    >>> 'aaaaaamnopqrb'.translate(table)

The problem is the new fast path for one-to-one ASCII mapping (unicode_fast_translate in Objects/unicodeobject.c) doesn't have a way to return the current input position in order to resume processing the translation. _PyUnicode_TranslateCharmap assumes it's the same as the current writer position, which is wrong when input characters have been deleted.
Date User Action Args
2016-03-01 16:31:18eryksunsetrecipients: + eryksun, serhiy.storchaka, ben.knight
2016-03-01 16:31:17eryksunsetmessageid: <>
2016-03-01 16:31:17eryksunlinkissue26464 messages
2016-03-01 16:31:17eryksuncreate