{"action":"closed","issue":{"url":"https://api.github.com/repos/nohtyprm/MrPython/issues/71","repository_url":"https://api.github.com/repos/nohtyprm/MrPython","labels_url":"https://api.github.com/repos/nohtyprm/MrPython/issues/71/labels{/name}","comments_url":"https://api.github.com/repos/nohtyprm/MrPython/issues/71/comments","events_url":"https://api.github.com/repos/nohtyprm/MrPython/issues/71/events","html_url":"https://github.com/nohtyprm/MrPython/issues/71","id":383777785,"node_id":"MDU6SXNzdWUzODM3Nzc3ODU=","number":71,"title":"VariableTypeError is not defined","user":{"login":"rmonat","id":13718360,"node_id":"MDQ6VXNlcjEzNzE4MzYw","avatar_url":"https://avatars1.githubusercontent.com/u/13718360?v=4","gravatar_id":"","url":"https://api.github.com/users/rmonat","html_url":"https://github.com/rmonat","followers_url":"https://api.github.com/users/rmonat/followers","following_url":"https://api.github.com/users/rmonat/following{/other_user}","gists_url":"https://api.github.com/users/rmonat/gists{/gist_id}","starred_url":"https://api.github.com/users/rmonat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmonat/subscriptions","organizations_url":"https://api.github.com/users/rmonat/orgs","repos_url":"https://api.github.com/users/rmonat/repos","events_url":"https://api.github.com/users/rmonat/events{/privacy}","received_events_url":"https://api.github.com/users/rmonat/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-23T10:48:23Z","updated_at":"2018-11-27T11:51:03Z","closed_at":"2018-11-27T11:51:03Z","author_association":"NONE","body":"On this piece of code, a background process fails with the following error:\r\n\"NameError: name 'VariableTypeError' is not defined\" (so MrPython hangs indefinitely). This is due to a type error in the definition of moyenne_generale : e is of type Etudiant, so notes should be of type list[int].\r\n\r\n```python\r\n#type Etudiant= tuple[str, str, int, list[int]]\r\n#BaseUPMC:list[Etudiant]\r\nBaseUPMC= [('GARGA', 'Amel', 20231343, [12,8,11,17,9]),('POLO','Marcello',20342241, [9,11,19,3]), ('AMANGEAI', 'Hildegard', 20244229, [15,11,7,14,12]), ('DENT', 'Arthur', 42424242, [8,4,9,4,12,5]),('ALEZE', 'Blaise',30012024,[17,15,20,14,18,16,20]),('D2','R2', 10100101,[10,10,10,10,10,10])]\r\n\r\ndef note_moyenne(L):\r\n    \"\"\" list[int]->float\r\n    hypothese: la note est comprise entre 0 et 20\r\n    \"\"\"\r\n    return 42.\r\n\r\nassert note_moyenne([12,8,14,6,5,15])==42\r\n\r\ndef moyenne_generale(L):\r\n    \"\"\"list[Etudiant]->float\r\n    \"\"\"\r\n    #m:float\r\n    m=0.0\r\n\r\n    #e:Etudiant\r\n    for e in L:\r\n        #notes:int\r\n        nom,pre,num,notes=e\r\n\r\n        m=m+note_moyenne(notes)\r\n    if len(L)>0:\r\n        return m/len(L)\r\n    else:\r\n        return m\r\n```"}}
{"actor":{"display_login":"fredokun"}}