<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>metabo346</author_name>
  <author_url>https://blog.hatena.ne.jp/metabo346/</author_url>
  <blog_title>metabo346の日記</blog_title>
  <blog_url>https://metabo346.hatenadiary.org/</blog_url>
  <categories>
  </categories>
  <description>たとえば class Hoge(): def huga(self,txt): print txt というクラスがあったとして def hugaを呼び出したい場合。 &gt;&gt;&gt;a = Hoge() #class Hogeのインスタンスを作る。 &gt;&gt;&gt;a.huga('bbbb') #メソッドを呼び出して引数を渡す bbbb pyファイル内にある場合 def _test(): a = Hoge() a.huga('bbbb')if __name__ == '__main__': _test() と一番ケツに書いておくと スクリプトファイルとして実行された時にだけdef _test()が実行されるらしい。</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmetabo346.hatenadiary.org%2Fentry%2F20100316%2F1268722334&quot; title=&quot;【python】classメソッドを呼び出す - metabo346の日記&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>2010-03-16 15:52:14</published>
  <title>【python】classメソッドを呼び出す</title>
  <type>rich</type>
  <url>https://metabo346.hatenadiary.org/entry/20100316/1268722334</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
