[issue25620] Bytes Issue

2015-11-13 Thread Marios Kourtesis
New submission from Marios Kourtesis: Hello, Executing the following code in a Python2 interpreter the result is True while running the same code in Python3 is False. I tested this in Python version 2.7.10 and 3.4.2. a = b'a' b = b'b' c = a+b c[1] == b'b' When I call type(c[1]) in Python2 I

[issue25620] Bytes Issue

2015-11-13 Thread SilentGhost
SilentGhost added the comment: Yes. It follows from definition of bytes in python3 https://docs.python.org/3/library/functions.html#bytes Some useful information is also available in 3.0 release notes: https://docs.python.org/3/whatsnew/3.0.html#text-vs-data-instead-of-unicode-vs-8-bit

[issue25620] Bytes Issue

2015-11-13 Thread Martin Panter
Martin Panter added the comment: More up-to-date information about the differences might be . If you want code that works in both versions, I find it simpler to use slicing: c[1:2] == b'b'. -- nosy: