<?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>
  </categories>
  <description>Python2.6とかで &gt;&gt;&gt; def foo(): ... locals()[&quot;hoge&quot;] = 1 ... print hoge ... &gt;&gt;&gt; foo() Traceback (most recent call last): File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt; File &quot;&lt;stdin&gt;&quot;, line 3, in foo NameError: global name 'hoge' is not defined こうなるわけで、これはローカルの名前空間が最適化の関係で書き換え不可になっていてlocals()が返すのはそのコピーを辞書ライクにしたものだと…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnishiohirokazu.hatenadiary.org%2Fentry%2F20101031%2F1288554629&quot; title=&quot;localsに関して誤解していた件 - 西尾泰和のはてなダイアリー&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>2010-10-31 04:50:29</published>
  <title>localsに関して誤解していた件</title>
  <type>rich</type>
  <url>https://nishiohirokazu.hatenadiary.org/entry/20101031/1288554629</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
