New submission from Virgil Dupras <hs...@hardcoded.net>:

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 = b' '
print s[0:1] == s

instead?

----------
components: 2to3 (2.x to 3.0 conversion tool)
messages: 108272
nosy: vdupras
priority: normal
severity: normal
status: open
title: 2to3 doesn't handle byte comparison well
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9043>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to