<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hiratara</author_name>
  <author_url>https://blog.hatena.ne.jp/hiratara/</author_url>
  <blog_title>Pixel Pedals of Tomakomai</blog_title>
  <blog_url>https://hiratara.hatenadiary.jp/</blog_url>
  <categories>
    <anon>技術</anon>
  </categories>
  <description>Pythonネタを書いたら、狙っていた通りckuwataさんが補足をくれたので追エントリしときます*1。ありがとうございます！ 要するにこれは「class の直下で変数宣言をしたい」「でも普通にそれをやるとクラス変数になってしまう」という問題なわけだな。こういう場合にどうするかというと、プロパティを使うのが多分スマートだろう。Diary? なるほど、確かにフィールドを直接触るよりプロパティを使うのが自然ですね。ただ、なんでもかんでもプロパティにするのかと思いきや、 ちなみに俺の方針としては、 外部仕様として公開するのならプロパティ そうでなければ __init__ 内部に列挙 というのがバラン…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhiratara.hatenadiary.jp%2Fentry%2F20090701%2F1246416953&quot; title=&quot;間違いやすいPythonのクラス変数とインスタンス変数(2) - Pixel Pedals of Tomakomai&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>2009-07-01 11:55:53</published>
  <title>間違いやすいPythonのクラス変数とインスタンス変数(2)</title>
  <type>rich</type>
  <url>https://hiratara.hatenadiary.jp/entry/20090701/1246416953</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
