aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs/posts/2021-10-02/python-unbound-local-error/index.html
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2022-04-23 23:49:57 +0900
committernsfisis <nsfisis@gmail.com>2022-04-23 23:49:57 +0900
commit13b78dc0d6b1795f77592be8c0d3212a0c63e173 (patch)
tree64e6b97c1f888013b3be27315f592093f9cc001d /docs/posts/2021-10-02/python-unbound-local-error/index.html
parent470b6afdb02fbd87a09d526784dd19b30852a6a2 (diff)
downloadnsfisis.github.io-13b78dc0d6b1795f77592be8c0d3212a0c63e173.tar.gz
nsfisis.github.io-13b78dc0d6b1795f77592be8c0d3212a0c63e173.tar.zst
nsfisis.github.io-13b78dc0d6b1795f77592be8c0d3212a0c63e173.zip
regenerate
Diffstat (limited to 'docs/posts/2021-10-02/python-unbound-local-error/index.html')
-rw-r--r--docs/posts/2021-10-02/python-unbound-local-error/index.html10
1 files changed, 4 insertions, 6 deletions
diff --git a/docs/posts/2021-10-02/python-unbound-local-error/index.html b/docs/posts/2021-10-02/python-unbound-local-error/index.html
index 171005b..b7e0c19 100644
--- a/docs/posts/2021-10-02/python-unbound-local-error/index.html
+++ b/docs/posts/2021-10-02/python-unbound-local-error/index.html
@@ -32,6 +32,10 @@
<header class="post-header">
<h1 class="post-title">[Python] クロージャとUnboundLocalError: local variable &#39;x&#39; referenced before assignment</h1>
<div class="post-meta">2021-10-02</div>
+ <ul class="post-tags">
+ <li><a href="https://blog.nsfisis.dev/tags/python">python</a></li>
+ <li><a href="https://blog.nsfisis.dev/tags/python3">python3</a></li>
+ </ul>
</header>
<div class="post-content"><p>この記事は Qiita から移植してきたものです。
元 URL: <a href="https://qiita.com/nsfisis/items/5d733703afcb35bbf399">https://qiita.com/nsfisis/items/5d733703afcb35bbf399</a></p>
@@ -71,12 +75,6 @@ f()
g()
</code></pre></div><p><code>(*)</code> のように、<code>nonlocal</code> を追加する。これにより一つ外側のスコープ (<code>g</code> の一つ外側 = <code>f</code>) で定義されている <code>x</code> を探しに行くようになる。</p>
</div>
- <footer class="post-footer">
- <ul class="post-tags">
- <li><a href="https://blog.nsfisis.dev/tags/python">python</a></li>
- <li><a href="https://blog.nsfisis.dev/tags/python3">python3</a></li>
- </ul>
- </footer>
</article></main>
<footer class="footer">
<span>&copy; 2022 <a href="https://blog.nsfisis.dev">REPL: Rest-Eat-Program Loop</a></span>