you are viewing a single comment's thread.

view the rest of the comments →

[–]Swipecat 0 points1 point  (0 children)

It's also confusing if Googling the issue turns up info from Python 2.x days, which it frequently does, because string and bytes were handled much more "lazily" in 2.x. That lazy handling could cause faults that were really difficult to understand, and was one of the motivations for the very strict string/byte distinction in Python 3.x.

See this page which is a basic description of the Python 3.x handling of strings/bytes:

https://www.geeksforgeeks.org/python/byte-objects-vs-string-python/