<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>fgshun</author_name>
  <author_url>https://blog.hatena.ne.jp/fgshun/</author_url>
  <blog_title>銀月の符号</blog_title>
  <blog_url>https://fgshun.hatenablog.com/</blog_url>
  <categories>
    <anon>Python</anon>
  </categories>
  <description>「088:多次元配列をループする」 。再帰関数で書いたことはあったけれど、再帰ジェネレータ？ で書いたのは初めて。 def traverse_unsafe(iterable): try: # イテレート可能かどうか確認 i = iter(iterable) except TypeError, e: # イテレート不可、データなのでそのまま返す value = iterable yield value else: # イテレート可、中身を取り出して返す for i2 in i: for value in traverse_unsafe(i2): yield value 入力によって変な結果が出る…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ffgshun.hatenablog.com%2Fentry%2F20090310%2F1236653532&quot; title=&quot; レシピ追加、多次元配列をループする - 銀月の符号&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-03-10 11:52:12</published>
  <title> レシピ追加、多次元配列をループする</title>
  <type>rich</type>
  <url>https://fgshun.hatenablog.com/entry/20090310/1236653532</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
