<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>nishiohirokazu</author_name>
  <author_url>https://blog.hatena.ne.jp/nishiohirokazu/</author_url>
  <blog_title>西尾泰和のはてなダイアリー</blog_title>
  <blog_url>https://nishiohirokazu.hatenadiary.org/</blog_url>
  <categories>
    <anon>Python</anon>
  </categories>
  <description>なんかJava的な頭で設計しているとこんなことを書きたくなったりするじゃない。「ヒットポイントは整数でー」と。実際にはPythonではこういう書き方はしないわけだけど。 class Monster(object): hitpoint = int defense = int attack = int で、コードをいきなり書かずにこういう書き方で設計を練っていたので、せっかくだからそれを有効活用するというのはどうだろうかと思った。コンストラクタの終了時のアサーションに使う。 class Monster(object): field_types = dict( hitpoint=int, defen…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnishiohirokazu.hatenadiary.org%2Fentry%2F20090213%2F1234475993&quot; title=&quot;型の宣言をしてコンストラクタでassert - 西尾泰和のはてなダイアリー&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-02-13 06:59:53</published>
  <title>型の宣言をしてコンストラクタでassert</title>
  <type>rich</type>
  <url>https://nishiohirokazu.hatenadiary.org/entry/20090213/1234475993</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
