<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ayokoyama</author_name>
  <author_url>https://blog.hatena.ne.jp/ayokoyama/</author_url>
  <blog_title>私の二次記憶</blog_title>
  <blog_url>https://ayokoyama.hatenadiary.org/</blog_url>
  <categories>
    <anon>python</anon>
  </categories>
  <description>Python のイディオムで、こういうのがある。 f = open('file.txt') whlie 1: line = f.readline() if not line: break process(line)これは、ファイルの終端（EOF）になると readline() が '' （空文字列） を返し、'' は論理値を期待する文脈で False と解釈されることを利用している。ちなみに None も同じ状況で False と解釈されるので、ちょっとした誤解が生じる（かも知れない）。 というのは、あくまでも EOF で readline() が返すのは '' であって、None や Fal…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fayokoyama.hatenadiary.org%2Fentry%2F20070420%2Fp1&quot; title=&quot; &amp;#39;&amp;#39; と None は違うのだ - 私の二次記憶&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>2007-04-20 00:00:01</published>
  <title> '' と None は違うのだ</title>
  <type>rich</type>
  <url>https://ayokoyama.hatenadiary.org/entry/20070420/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
