News for hackers. Stuff that matters.
Re:Moving Away from Python 2 by comex on Friday May 20, 2016 @07:23PM (#11742308)
It's a limitation of how the programming language interacts with the Windows console, and it's a mistake. If you are writing potentially-garbled strings directly to the console, there is already no guarantee that the output will properly reflect the string or e.g. copying and pasting will work correctly, because the string could include backspace characters, or a ton of newlines. Therefore it doesn't make sense to do anything other than make a 'best effort' attempt when rendering strings to the console, including with Unicode handling. If it works, great, but if the string is invalid Unicode, that's only one of multiple problematic cases, so what exactly is throwing an exception supposed to accomplish? Python should use replacement characters by default in this case.
Re:Moving Away from Python 2 by rjurney on Friday May 20, 2016 @09:36PM (#11742741)
Stop using the Windows console. Or fix it. More rational than a breaking upgrade to Python 3.
Re:Moving Away from Python 2 by paulddraper on Friday May 20, 2016 @10:47PM (#11742954)
Fixing the Windows console rather than upgrading to Python 3 is the only sensible choice.

</s>