diff options
| author | nsfisis <nsfisis@gmail.com> | 2022-02-23 15:31:50 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2022-02-23 15:31:50 +0900 |
| commit | a4a72de9af0d0a6d17944f847a4d5fed2b05d2a7 (patch) | |
| tree | 8e47394a19d0341934c72704f4ba228e729a6a12 /docs/posts/python-unbound-local-error/index.html | |
| parent | 1b9939e183b72dfc4f73264b6bed8cc286cf374e (diff) | |
| download | nsfisis.github.io-a4a72de9af0d0a6d17944f847a4d5fed2b05d2a7.tar.gz nsfisis.github.io-a4a72de9af0d0a6d17944f847a4d5fed2b05d2a7.tar.zst nsfisis.github.io-a4a72de9af0d0a6d17944f847a4d5fed2b05d2a7.zip | |
change site domain to `blog.nsfisis.dev`
Diffstat (limited to 'docs/posts/python-unbound-local-error/index.html')
| -rw-r--r-- | docs/posts/python-unbound-local-error/index.html | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/docs/posts/python-unbound-local-error/index.html b/docs/posts/python-unbound-local-error/index.html index e3a142c..227164a 100644 --- a/docs/posts/python-unbound-local-error/index.html +++ b/docs/posts/python-unbound-local-error/index.html @@ -16,12 +16,12 @@ def f(): x = 0 def g(): x += 1 g() f() 関数 g から 関数 f のスコー # 注: var は正しい Python の文法ではない。上記参照のこと def f(): var x # f の local変数 'x' を宣言 x = 0 # x に 0 を代入 def g(): # f の内部関数 g を定義 var x # g の local変数 'x' を宣言 # たまたま f にも同じ名前の変数があるが、それとは別の変数 x += 1 # x に 1 を加算 (x = x + 1 の糖衣構文) # 加算する前の値を参照しようとするが、まだ代入されていないためエラー g() 当初の意図を表現するには、次のように書けばよい。"> <meta name="author" content=""> - <link href="https://nsfisis.github.io/an-old-hope.min.css" rel="stylesheet"> - <link href="https://nsfisis.github.io/style.css" rel="stylesheet"> - <link href="https://nsfisis.github.io/custom.css" rel="stylesheet"> + <link href="https://blog.nsfisis.dev/an-old-hope.min.css" rel="stylesheet"> + <link href="https://blog.nsfisis.dev/style.css" rel="stylesheet"> + <link href="https://blog.nsfisis.dev/custom.css" rel="stylesheet"> - <link rel="apple-touch-icon" href="https://nsfisis.github.io/apple-touch-icon.png"> - <link rel="icon" href="https://nsfisis.github.io/favicon.ico"> + <link rel="apple-touch-icon" href="https://blog.nsfisis.dev/apple-touch-icon.png"> + <link rel="icon" href="https://blog.nsfisis.dev/favicon.ico"> <meta name="generator" content="Hugo 0.88.1" /> @@ -79,7 +79,7 @@ def f(): x = 0 def g(): x += 1 g() f() 関数 g から 関数 f のスコー </script> <header class="header"> <nav class="nav"> - <p class="logo"><a href="https://nsfisis.github.io">REPL: Rest-Eat-Program Loop</a></p> + <p class="logo"><a href="https://blog.nsfisis.dev">REPL: Rest-Eat-Program Loop</a></p> </nav> </header> <main class="main"> @@ -131,13 +131,13 @@ f() </article></main> <footer class="footer"> - <span>© 2021 <a href="https://nsfisis.github.io">REPL: Rest-Eat-Program Loop</a></span> + <span>© 2022 <a href="https://blog.nsfisis.dev">REPL: Rest-Eat-Program Loop</a></span> <span>·</span> <span>Powered by <a href="https://gohugo.io/" rel="noopener" target="_blank">Hugo️️</a>️</span> <span>·</span> <span>Theme️ <a href="https://github.com/nanxiaobei/hugo-paper" rel="noopener" target="_blank">Paper</a></span> </footer> -<script src="https://nsfisis.github.io/highlight.min.js"></script> +<script src="https://blog.nsfisis.dev/highlight.min.js"></script> <script> hljs.initHighlightingOnLoad(); </script> |
