This is because the Python 2 bytes object is simply an alias for Python 2’s str, rather than a true implementation of the Python 3 bytes object, which is substantially different.https://python-future.org/byt...
https://python-future.org/byt...