<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ohke</author_name>
  <author_url>https://blog.hatena.ne.jp/ohke/</author_url>
  <blog_title>け日記</blog_title>
  <blog_url>https://ohke.hateblo.jp/</blog_url>
  <categories>
    <anon>Python</anon>
  </categories>
  <description>これまで定数クラスを作ってやり過ごすことが多かったのですが、enumが比較的使いやすかったので、 enum enumはPython 3.4から標準ライブラリに追加されたモジュールで、列挙型をサポートするものです。 docs.python.org 実装 最初にenumをインポートしておきます。Python 3.7.4を使っています。 import enum BTreeなどの木構造のノードを考えてみます。各ノードは根ノード (ROOT) 、中間ノード (INTERNAL) 、葉ノード (LEAF) の3種類のいずれかに分類されるものとします。 それをTreeNodeTypeという列挙型で表現すると…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fohke.hateblo.jp%2Fentry%2F2020%2F03%2F28%2F230000&quot; title=&quot;Pythonの列挙型 (enum) - け日記&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-03-28 23:00:00</published>
  <title>Pythonの列挙型 (enum)</title>
  <type>rich</type>
  <url>https://ohke.hateblo.jp/entry/2020/03/28/230000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
