<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>PEP 557 - 标签 - 研发日志 · R&amp;D Log</title><link>https://rd163.visword.com/tags/pep-557/</link><description>PEP 557 - 标签 - 研发日志 · R&amp;D Log</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><managingEditor>whutluohui@gmail.com (小智晖)</managingEditor><webMaster>whutluohui@gmail.com (小智晖)</webMaster><copyright>本作品采用知识共享署名-非商业性使用 4.0 国际许可协议进行许可。</copyright><lastBuildDate>Sun, 12 Jan 2025 00:00:00 +0800</lastBuildDate><atom:link href="https://rd163.visword.com/tags/pep-557/" rel="self" type="application/rss+xml"/><item><title>Python 的 dataclass</title><link>https://rd163.visword.com/posts/python-dataclass/</link><pubDate>Sun, 12 Jan 2025 00:00:00 +0800</pubDate><author><name>小智晖</name></author><guid>https://rd163.visword.com/posts/python-dataclass/</guid><description><![CDATA[<p><code>dataclasses</code> 是 Python 3.7 起进入标准库的一个模块，由 <a href="https://peps.python.org/pep-0557/" target="_blank" rel="noopener noreferrer">PEP 557</a> 引入，作者是 Eric V. Smith。它的核心目标是：为「主要用来存储数据的类」自动生成 <code>__init__</code>、<code>__repr__</code>、<code>__eq__</code> 等样板方法（boilerplate）,让开发者把精力放在字段定义上而不是重复的 <code>def __init__(self, ...)</code>。</p>]]></description></item></channel></rss>