Post

🏆 Top 5 Python 3.15 features to start using today: 1. Lazy imports 2. New built-in `frozendict` 3. New built-in `sentinel` 4. Unpacking inside comprehensions 5. New sampling profiler Tachyon What's your top Python 3.15 new feature?

0 reposts5 likes

I think my top 5 are: 1. UTF-8 as the default encoding on Windows 2. The new sentinel type 3. Unpacking in comprehensions: [*sub for sub in nested] 4. The new sampling profiler 5. pprint's new expand=True But it's hard to choose!

Basically Windows has been reading/writing with an encoding of cp1252 by default for forever. Both it and utf-8 are ASCII supersets but DIFFERENT ones. Valid text in cp1252 can result in errors or emojibake in utf-8 and vice versa. It's a cross-platform mess. And once 3.14 is EOL'd it'll be done.