<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>D-Strings on Python Brasil — Aprenda Python em Português</title>
    <link>https://python.dev.br/tags/d-strings/</link>
    <description>Recent content in D-Strings on Python Brasil — Aprenda Python em Português</description>
    <generator>Hugo</generator>
    <language>pt-br</language>
    <lastBuildDate>Fri, 10 Apr 2026 15:33:44 -0300</lastBuildDate>
    <atom:link href="https://python.dev.br/tags/d-strings/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>D-Strings no Python 3.15: Adeus textwrap.dedent()</title>
      <link>https://python.dev.br/blog/python-d-strings-pep-822-dedent/</link>
      <pubDate>Fri, 10 Apr 2026 00:00:00 +0000</pubDate>
      <guid>https://python.dev.br/blog/python-d-strings-pep-822-dedent/</guid>
      <description>&lt;p&gt;Se você já escreveu strings multiline dentro de funções ou classes em Python, provavelmente conhece o problema: a indentação do código contamina o conteúdo da string. A solução clássica sempre foi &lt;code&gt;textwrap.dedent()&lt;/code&gt;, mas ela tem limitações e adiciona overhead em tempo de execução.&lt;/p&gt;&#xA;&lt;p&gt;A &lt;strong&gt;PEP 822&lt;/strong&gt; propõe uma solução elegante para o Python 3.15: as &lt;strong&gt;d-strings&lt;/strong&gt; (dedented strings). Com o prefixo &lt;code&gt;d&lt;/code&gt; antes de aspas triplas, a indentação é removida automaticamente pelo compilador, sem custo em runtime. É uma daquelas mudanças que parece pequena, mas melhora o dia a dia de quem escreve Python profissionalmente.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
