{"action":"created","issue":{"url":"https://api.github.com/repos/csu/pyquora/issues/51","labels_url":"https://api.github.com/repos/csu/pyquora/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/csu/pyquora/issues/51/comments","events_url":"https://api.github.com/repos/csu/pyquora/issues/51/events","html_url":"https://github.com/csu/pyquora/pull/51","id":53288418,"number":51,"title":"Avoid construction of dictionary to check whether an answer was found","user":{"login":"svisser","id":723226,"avatar_url":"https://avatars.githubusercontent.com/u/723226?v=3","gravatar_id":"","url":"https://api.github.com/users/svisser","html_url":"https://github.com/svisser","followers_url":"https://api.github.com/users/svisser/followers","following_url":"https://api.github.com/users/svisser/following{/other_user}","gists_url":"https://api.github.com/users/svisser/gists{/gist_id}","starred_url":"https://api.github.com/users/svisser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svisser/subscriptions","organizations_url":"https://api.github.com/users/svisser/orgs","repos_url":"https://api.github.com/users/svisser/repos","events_url":"https://api.github.com/users/svisser/events{/privacy}","received_events_url":"https://api.github.com/users/svisser/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-03T00:39:38Z","updated_at":"2015-01-03T05:43:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/csu/pyquora/pulls/51","html_url":"https://github.com/csu/pyquora/pull/51","diff_url":"https://github.com/csu/pyquora/pull/51.diff","patch_url":"https://github.com/csu/pyquora/pull/51.patch"},"body":"Minor simplification to the code by not constructing an unnecessary dictionary."},"comment":{"url":"https://api.github.com/repos/csu/pyquora/issues/comments/68584423","html_url":"https://github.com/csu/pyquora/pull/51#issuecomment-68584423","issue_url":"https://api.github.com/repos/csu/pyquora/issues/51","id":68584423,"user":{"login":"rohithpr","id":10276811,"avatar_url":"https://avatars.githubusercontent.com/u/10276811?v=3","gravatar_id":"","url":"https://api.github.com/users/rohithpr","html_url":"https://github.com/rohithpr","followers_url":"https://api.github.com/users/rohithpr/followers","following_url":"https://api.github.com/users/rohithpr/following{/other_user}","gists_url":"https://api.github.com/users/rohithpr/gists{/gist_id}","starred_url":"https://api.github.com/users/rohithpr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rohithpr/subscriptions","organizations_url":"https://api.github.com/users/rohithpr/orgs","repos_url":"https://api.github.com/users/rohithpr/repos","events_url":"https://api.github.com/users/rohithpr/events{/privacy}","received_events_url":"https://api.github.com/users/rohithpr/received_events","type":"User","site_admin":false},"created_at":"2015-01-03T05:43:39Z","updated_at":"2015-01-03T05:43:39Z","body":"That is from back when get_one_answer() would return an empty dictionary if any error had occurred. :D Checking is pointless now.\r\nI think its best to put the function call within a try block and ignoring any errors. Since we are generating random strings and making the function call, there will be errors every now and then."}}