Skip to content

Commit 8b7c912

Browse files
authored
pythongh-92417: stdtypes docs: shorten discussion of Python 2 differences
Given that 2.7 has now been end-of-life for two and a half years, I don't think we need such a detailed explanation here anymore of the differences between Python 2 and Python 3. python#92417
1 parent 0924b95 commit 8b7c912

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

Doc/library/stdtypes.rst

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2574,14 +2574,10 @@ since it is often more useful than e.g. ``bytes([46, 46, 46])``. You can
25742574
always convert a bytes object into a list of integers using ``list(b)``.
25752575

25762576
.. note::
2577-
For Python 2.x users: In the Python 2.x series, a variety of implicit
2578-
conversions between 8-bit strings (the closest thing 2.x offers to a
2579-
built-in binary data type) and Unicode strings were permitted. This was a
2580-
backwards compatibility workaround to account for the fact that Python
2581-
originally only supported 8-bit text, and Unicode text was a later
2582-
addition. In Python 3.x, those implicit conversions are gone - conversions
2577+
In Python 3.x, conversions
25832578
between 8-bit binary data and Unicode text must be explicit, and bytes and
2584-
string objects will always compare unequal.
2579+
string objects will always compare unequal. This differs from the behaviour
2580+
in Python 2.x.
25852581

25862582

25872583
.. _typebytearray:

0 commit comments

Comments
 (0)