[issue30435] Documentation either unclear or incorrect on comparisons between bytes and strings in Python 3

2021-03-12 Thread Eryk Sun
Change by Eryk Sun : -- type: behavior -> enhancement versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.5, Python 3.6, Python 3.7 ___ Python tracker ___ ___

[issue30435] Documentation either unclear or incorrect on comparisons between bytes and strings in Python 3

2017-05-23 Thread Brian Ward
Brian Ward added the comment: The "should" recommendation seems like the right direction, but feels like it needs an explanation (in case someone's trying to run some 2.7 code and is wondering why their comparisons don't work anymore). Unfortunately, it's a little complicated to pile into a se

[issue30435] Documentation either unclear or incorrect on comparisons between bytes and strings in Python 3

2017-05-23 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- versions: -Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue30435] Documentation either unclear or incorrect on comparisons between bytes and strings in Python 3

2017-05-22 Thread Martin Panter
Martin Panter added the comment: Also, “-bb” turns it into an exception, and the same applies to bytes vs int: >>> b"a" == "a" Traceback (most recent call last): File "", line 1, in BytesWarning: Comparison between bytes and string >>> b"a" == 0x61 Traceback (most recent call last): File ""

[issue30435] Documentation either unclear or incorrect on comparisons between bytes and strings in Python 3

2017-05-22 Thread Eryk Sun
Eryk Sun added the comment: How about "cannot be compared by value" or "cannot be ordered by value"? Emphasizing the value aspect doesn't conflict with the default equality comparison by identity. Note that starting Python with the -b option causes the bytes type to raise a warning in this ca

[issue30435] Documentation either unclear or incorrect on comparisons between bytes and strings in Python 3

2017-05-22 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- versions: +Python 2.7, Python 3.5 -Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue30435] Documentation either unclear or incorrect on comparisons between bytes and strings in Python 3

2017-05-22 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- versions: -Python 3.4, Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue30435] Documentation either unclear or incorrect on comparisons between bytes and strings in Python 3

2017-05-22 Thread ipatrol
New submission from ipatrol: https://docs.python.org/3/reference/expressions.html#comparisons says that "Strings and binary sequences cannot be directly compared." That would seem to me to imply that an equality between them would raise an exception, as also claimed by https://wiki.python.org/