{"action":"opened","issue":{"url":"https://api.github.com/repos/TemDee/Murder_Mystery/issues/7","repository_url":"https://api.github.com/repos/TemDee/Murder_Mystery","labels_url":"https://api.github.com/repos/TemDee/Murder_Mystery/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/TemDee/Murder_Mystery/issues/7/comments","events_url":"https://api.github.com/repos/TemDee/Murder_Mystery/issues/7/events","html_url":"https://github.com/TemDee/Murder_Mystery/issues/7","id":360458171,"node_id":"MDU6SXNzdWUzNjA0NTgxNzE=","number":7,"title":"Watch use of 'in' in the frequency_comparison() function","user":{"login":"karl-project-review","id":37846313,"node_id":"MDQ6VXNlcjM3ODQ2MzEz","avatar_url":"https://avatars0.githubusercontent.com/u/37846313?v=4","gravatar_id":"","url":"https://api.github.com/users/karl-project-review","html_url":"https://github.com/karl-project-review","followers_url":"https://api.github.com/users/karl-project-review/followers","following_url":"https://api.github.com/users/karl-project-review/following{/other_user}","gists_url":"https://api.github.com/users/karl-project-review/gists{/gist_id}","starred_url":"https://api.github.com/users/karl-project-review/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karl-project-review/subscriptions","organizations_url":"https://api.github.com/users/karl-project-review/orgs","repos_url":"https://api.github.com/users/karl-project-review/repos","events_url":"https://api.github.com/users/karl-project-review/events{/privacy}","received_events_url":"https://api.github.com/users/karl-project-review/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-14T21:18:28Z","updated_at":"2018-09-14T21:18:28Z","closed_at":null,"author_association":"NONE","body":"There are places in the frequency_comparison() function where unnecessary 'in' statements are included, which result in some of the comparisons not working right and the resulting frequencies being off. For example, here a few instances of this in the existing code:\r\n```python\r\nif a == b in table2.keys() and table1.get(a) >= table2.get(b):\r\n```\r\n```python\r\nelif a == b in table2.keys() and table1.get(a) < table2.get(b):\r\n```\r\n```python\r\nif a not in b in table2.keys():\r\n```\r\n```python\r\nif b not in a in table1.keys():\r\n```\r\nBelow are examples of these lines rewritten without the improper/unnecessary  'in' statements:\r\n```python\r\nif a == b and table1.get(a) >= table2.get(b):\r\n```\r\n```python\r\nelif a == b and table1.get(a) < table2.get(b):\r\n```\r\n```python\r\nif a not in table2.keys():\r\n```\r\n```python\r\nif b not in table1.keys():\r\n```\r\nNote that in the first two, I removed the \"in table2.keys()\" because b is already assigned a set value before this comparison takes place, and in the second two, I removed \"in b\" and \"in a\" because we are checking if a and b exist in any of the keys for table2 and table1, not if they exist within a single variable in those keys.\r\n"}}
{"actor":{"display_login":"karl-project-review"}}