<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Ehren</author_name>
  <author_url>https://blog.hatena.ne.jp/Ehren/</author_url>
  <blog_title>Keep on moving</blog_title>
  <blog_url>https://masahito.hatenablog.com/</blog_url>
  <categories>
    <anon>python</anon>
  </categories>
  <description>対象バージョン Python 3.7以降 TL;DR dataclassでも __slots__ を使える __slots__ をつかうとpropertyの追加ができなくなる(自由度が下るが、コードをおいやすくなる) slots とは docs.python.org __slots__ を使うと、(プロパティのように) データメンバを明示的に宣言し、 (明示的に __slots__ で宣言しているか親クラスに存在しているかでない限り) __dict__ や __weakref__ を作成しないようにできます。 __dict__ を使うのに比べて、節約できるメモリ空間はかなり大きいです。 属性探…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmasahito.hatenablog.com%2Fentry%2F2020%2F05%2F11%2F013643&quot; title=&quot;dataclassと __slots__ について調べた - Keep on moving&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-05-11 01:36:43</published>
  <title>dataclassと __slots__ について調べた</title>
  <type>rich</type>
  <url>https://masahito.hatenablog.com/entry/2020/05/11/013643</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
