<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>yohpapa</author_name>
  <author_url>https://blog.hatena.ne.jp/yohpapa/</author_url>
  <blog_title>Yohpapa’s note</blog_title>
  <blog_url>https://yohpapa.hatenadiary.org/</blog_url>
  <categories>
    <anon>Python</anon>
  </categories>
  <description>また昨日の続きです。 Generators イテレータ関連の話題が続きます。yield文です。JavaではThread.yield()として利用するのですが、全然意味が違います。C#のyield文と同じです。ループなどの中で利用すると処理の途中でreturnすることが出来、かつ処理をそこから再開させることが出来るのです。まさしくイテレータの動きですよね。yield文を使ったイテレータのことをGeneratorといいます。 &gt;&gt;&gt; def reverse(data): ... for index in range(len(data) - 1, -1, -1): ... yield data[in…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyohpapa.hatenadiary.org%2Fentry%2F20110819%2F1313704539&quot; title=&quot; Classes - Yohpapa’s note&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>2011-08-19 06:55:39</published>
  <title> Classes</title>
  <type>rich</type>
  <url>https://yohpapa.hatenadiary.org/entry/20110819/1313704539</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
