News for hackers. Stuff that matters.
Re:Why Is the Migration to Python 3 Taking So Long? by kstrauser on Thursday November 14, 2019 @04:01PM (#21539354)
No, it's Python 2 that thinks those are all text. Python 3 makes you explicitly say "convert this stream of bytes into a text encoded string", and from then on it's a str object.

Python 2 was happy to (try to) let you call text methods on a JPEG. Python 3 draws an appropriate distinction between the two.

Re:Why Is the Migration to Python 3 Taking So Long? by test7777 on Sunday November 17, 2019 @07:06AM (#21557587)
Python 2's "str" is a bytestring. All of those are bytestrings in Python 2 as they should be. Python 3 makes them text and suddenly i can not output data over stdout anymore without extra steps of switching the mode of stdout from some arbitrary text default.