{"action":"closed","issue":{"url":"https://api.github.com/repos/brython-dev/brython/issues/338","labels_url":"https://api.github.com/repos/brython-dev/brython/issues/338/labels{/name}","comments_url":"https://api.github.com/repos/brython-dev/brython/issues/338/comments","events_url":"https://api.github.com/repos/brython-dev/brython/issues/338/events","html_url":"https://github.com/brython-dev/brython/issues/338","id":120152344,"number":338,"title":"Internal Javascript Error should be a NameError","user":{"login":"aroberge","id":629698,"avatar_url":"https://avatars.githubusercontent.com/u/629698?v=3","gravatar_id":"","url":"https://api.github.com/users/aroberge","html_url":"https://github.com/aroberge","followers_url":"https://api.github.com/users/aroberge/followers","following_url":"https://api.github.com/users/aroberge/following{/other_user}","gists_url":"https://api.github.com/users/aroberge/gists{/gist_id}","starred_url":"https://api.github.com/users/aroberge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aroberge/subscriptions","organizations_url":"https://api.github.com/users/aroberge/orgs","repos_url":"https://api.github.com/users/aroberge/repos","events_url":"https://api.github.com/users/aroberge/events{/privacy}","received_events_url":"https://api.github.com/users/aroberge/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-03T11:44:49Z","updated_at":"2015-12-03T15:41:32Z","closed_at":"2015-12-03T15:41:32Z","body":"The following program\r\n```python\r\ndef plus():\r\n    global a\r\n    print(a)\r\n\r\nplus()\r\n```\r\nyields\r\n```\r\nInternal Javascript error: TypeError: Cannot read property '$nat' of undefined ...\r\n```\r\ninstead of\r\n```\r\nNameError: name 'a' is not defined\r\n```\r\n\r\nApologies for the piecemeal reporting of these types of bugs.  I am finding them as I'm attempting to write a tutorial for beginners, making sure that I cover all relevant context.   Note that I do not plan (so far) to cover the use of ``nonlocal``; there could be other scope related problems lurking there.\r\n"}}