logoalt Hacker News

ruudatoday at 7:56 AM3 repliesview on HN

> Python now uses UTF-8 as the default encoding, independent of the system’s environment.

Nice, not specifying the encoding is one of the most common issues I need to point out in code reviews.


Replies

franga2000today at 8:30 AM

You mean the coding= comment? Where are you shipping your code that that was actually a problem? I've never been on a project where we did that, let alone needed it.

show 1 reply
joshribakofftoday at 7:56 AM

Have you considered reducing review noise by using static analysis?

show 1 reply
formerly_proventoday at 8:28 AM

encode()/decode() have used UTF-8 as the default since Python 3.2 (soon, 15 years ago). This is about the default encoding for e.g. the "encoding" parameter of open().