{"comment":{"url":"https://api.github.com/repos/mysociety/pombola/comments/13907807","html_url":"https://github.com/mysociety/pombola/commit/0b259d1e806cc6416210830896be097d59bde0d8#commitcomment-13907807","id":13907807,"user":{"login":"mhl","id":7907,"avatar_url":"https://avatars.githubusercontent.com/u/7907?v=3","gravatar_id":"","url":"https://api.github.com/users/mhl","html_url":"https://github.com/mhl","followers_url":"https://api.github.com/users/mhl/followers","following_url":"https://api.github.com/users/mhl/following{/other_user}","gists_url":"https://api.github.com/users/mhl/gists{/gist_id}","starred_url":"https://api.github.com/users/mhl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhl/subscriptions","organizations_url":"https://api.github.com/users/mhl/orgs","repos_url":"https://api.github.com/users/mhl/repos","events_url":"https://api.github.com/users/mhl/events{/privacy}","received_events_url":"https://api.github.com/users/mhl/received_events","type":"User","site_admin":false},"position":50,"line":616,"path":"pombola/south_africa/views.py","commit_id":"0b259d1e806cc6416210830896be097d59bde0d8","created_at":"2015-10-21T17:50:35Z","updated_at":"2015-10-21T17:50:35Z","body":"It might be clearer to use `defaultdict(int)` instead, or\r\n\r\n```python\r\nyear_dict.setdefault(attendance, 0)\r\nyear_dict[attendance] += 1\r\n```"}}