<?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>すごい昔のエントリですが、コメントできなくなってたんでTBで。 やっぱり、インスタンス変数（クラス変数も！）は先頭で宣言しないと気持ち悪い。だから、初期化の必要がなくても以下のように書いておく。 class Hoge: #名前 name = None def __init__(self, name): self.name = name Pythonのインスタンス変数 気持ちはとてもとてもよくわかるんですけど、class宣言の中に変数を置いてもそれはあくまでもclassオブジェクトに紐づく値となってしまい、インスタンスの変数とはなりません。もちろん、わかってて使うなら大丈夫ですけど。 &gt;&gt;&gt; c…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhiratara.hatenadiary.jp%2Fentry%2F20090630%2F1246332064&quot; title=&quot;間違いやすいPythonのクラス変数とインスタンス変数 - 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-06-30 12:21:04</published>
  <title>間違いやすいPythonのクラス変数とインスタンス変数</title>
  <type>rich</type>
  <url>https://hiratara.hatenadiary.jp/entry/20090630/1246332064</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
