[issue9043] 2to3 doesn't handle byte comparison well

2010-06-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: Replacing string indexes with length-1 slices in the 2.x codebase, whether or not one one is running 2to3, seems to be a 'known' technique for Python3 portability and unicode-bytes inter-operability. (It was discussed this week on py-dev list .) But I do not

[issue9043] 2to3 doesn't handle byte comparison well

2010-06-21 Thread Éric Araujo
Changes by Éric Araujo : -- stage: -> committed/rejected ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue9043] 2to3 doesn't handle byte comparison well

2010-06-21 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2to3 can't guess which slices are from bytes. -- nosy: +benjamin.peterson resolution: -> wont fix status: open -> closed ___ Python tracker

[issue9043] 2to3 doesn't handle byte comparison well

2010-06-21 Thread Virgil Dupras
New submission from Virgil Dupras : If we run 2to3 on the following code: s = b' ' print s[0] == s we end up with this: s = b' ' print(s[0] == s) However, the first code, under python2 prints True while the converted code, under python3 prints False. Shouldn't 2to3 convert this code to: s