[Python] クロージャとUnboundLocalError: local variable 'x' referenced before assignment

Python における UnboundLocalError の理由と対処法。

Posted on