D-Strings Could End Your textwrap.dedent() Days and Other Python News for April 2026
If you’ve ever wrapped a multiline string in textwrap.dedent() and wondered why Python can’t just handle that for you, then your PEP has arrived. PEP 822 proposes d-strings, a new d”””…””” prefix that automatically strips leading indentation. It’s one of those small quality-of-life ideas that make you wonder why it didn’t exist already. The PEP is currently a draft proposal. March also delivered Python 3.15.0 alpha 7 with lazy imports you can finally test and security patches across three older […]
Read more