{"action":"created","comment":{"url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/pulls/comments/28289268","id":28289268,"diff_hunk":"@@ -0,0 +1,42 @@\n+#!/usr/bin/env python\n+# -*- coding: utf-8 -*-\n+\"\"\"Combining two datasets using dictionaries \"\"\"\n+\n+\n+def sum_orders(customers, orders):\n+    \"\"\"Function takes two parameters customers and orders and combine\n+       the values into a single dictionary.\n+       Arg:\n+            customers(dict): a nested dictionary containing names and emails.\n+            orders(dict): a nested dictionary containing information like\n+                          customer id and order total.\n+      Return:\n+            returns a new dictionary combined with the keys and containing\n+            data from two dictionaries.\n+      Examples:\n+                  CUSTOMERS = {2: {'name': 'Person One', 'email': 'email@one.com'},\n+                      5: {'name': 'Person Two', 'email': 'email@two.com'}}\n+                  ORDERS = {1: {'customer_id': 2, 'total': 10},\n+                      3: {'customer_id': 2, 'total': 10},\n+                      4: {'customer_id': 3, 'total': 15}}\n+                  >>>\n+\n+    \"\"\"    \n+dict1 = {}\n+for cust in ORDERS.itervalues():\n+    keys = cust['customer_id']\n+    if cust['customer_id'] in dict1.keys():","path":"task_01.py","position":28,"original_position":28,"commit_id":"1276322cfc52f18de35d4a6a07a8bcb3b0e45772","original_commit_id":"1276322cfc52f18de35d4a6a07a8bcb3b0e45772","user":{"login":"cheuschober","id":1184479,"avatar_url":"https://avatars.githubusercontent.com/u/1184479?v=3","gravatar_id":"","url":"https://api.github.com/users/cheuschober","html_url":"https://github.com/cheuschober","followers_url":"https://api.github.com/users/cheuschober/followers","following_url":"https://api.github.com/users/cheuschober/following{/other_user}","gists_url":"https://api.github.com/users/cheuschober/gists{/gist_id}","starred_url":"https://api.github.com/users/cheuschober/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cheuschober/subscriptions","organizations_url":"https://api.github.com/users/cheuschober/orgs","repos_url":"https://api.github.com/users/cheuschober/repos","events_url":"https://api.github.com/users/cheuschober/events{/privacy}","received_events_url":"https://api.github.com/users/cheuschober/received_events","type":"User","site_admin":false},"body":"@gpsingh12 This is an incorrect way to check for a value in a dictionary's keys because it has to build a whole list of the keys in memory before it can then do an `in` check. Instead, just use `somekey in mydict` you'll find it's much easier to read and more performant than `somekey in mydict.keys()`","created_at":"2015-04-13T23:32:28Z","updated_at":"2015-04-13T23:32:28Z","html_url":"https://github.com/is210-2015-spring-01/is210-week-10-synthesizing/pull/7#discussion_r28289268","pull_request_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/pulls/comments/28289268"},"html":{"href":"https://github.com/is210-2015-spring-01/is210-week-10-synthesizing/pull/7#discussion_r28289268"},"pull_request":{"href":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/pulls/7","id":33127550,"html_url":"https://github.com/is210-2015-spring-01/is210-week-10-synthesizing/pull/7","diff_url":"https://github.com/is210-2015-spring-01/is210-week-10-synthesizing/pull/7.diff","patch_url":"https://github.com/is210-2015-spring-01/is210-week-10-synthesizing/pull/7.patch","issue_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/issues/7","number":7,"state":"open","locked":false,"title":"Assignment 10 syn","user":{"login":"gpsingh12","id":10782717,"avatar_url":"https://avatars.githubusercontent.com/u/10782717?v=3","gravatar_id":"","url":"https://api.github.com/users/gpsingh12","html_url":"https://github.com/gpsingh12","followers_url":"https://api.github.com/users/gpsingh12/followers","following_url":"https://api.github.com/users/gpsingh12/following{/other_user}","gists_url":"https://api.github.com/users/gpsingh12/gists{/gist_id}","starred_url":"https://api.github.com/users/gpsingh12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gpsingh12/subscriptions","organizations_url":"https://api.github.com/users/gpsingh12/orgs","repos_url":"https://api.github.com/users/gpsingh12/repos","events_url":"https://api.github.com/users/gpsingh12/events{/privacy}","received_events_url":"https://api.github.com/users/gpsingh12/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-04-12T22:13:56Z","updated_at":"2015-04-13T23:32:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"59d2d8bd2cc0a1c1d95c13bbcaa1ba601b36138d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/pulls/7/commits","review_comments_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/pulls/7/comments","review_comment_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/pulls/comments{/number}","comments_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/issues/7/comments","statuses_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/statuses/1276322cfc52f18de35d4a6a07a8bcb3b0e45772","head":{"label":"gpsingh12:master","ref":"master","sha":"1276322cfc52f18de35d4a6a07a8bcb3b0e45772","user":{"login":"gpsingh12","id":10782717,"avatar_url":"https://avatars.githubusercontent.com/u/10782717?v=3","gravatar_id":"","url":"https://api.github.com/users/gpsingh12","html_url":"https://github.com/gpsingh12","followers_url":"https://api.github.com/users/gpsingh12/followers","following_url":"https://api.github.com/users/gpsingh12/following{/other_user}","gists_url":"https://api.github.com/users/gpsingh12/gists{/gist_id}","starred_url":"https://api.github.com/users/gpsingh12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gpsingh12/subscriptions","organizations_url":"https://api.github.com/users/gpsingh12/orgs","repos_url":"https://api.github.com/users/gpsingh12/repos","events_url":"https://api.github.com/users/gpsingh12/events{/privacy}","received_events_url":"https://api.github.com/users/gpsingh12/received_events","type":"User","site_admin":false},"repo":{"id":33391145,"name":"is210-week-10-synthesizing","full_name":"gpsingh12/is210-week-10-synthesizing","owner":{"login":"gpsingh12","id":10782717,"avatar_url":"https://avatars.githubusercontent.com/u/10782717?v=3","gravatar_id":"","url":"https://api.github.com/users/gpsingh12","html_url":"https://github.com/gpsingh12","followers_url":"https://api.github.com/users/gpsingh12/followers","following_url":"https://api.github.com/users/gpsingh12/following{/other_user}","gists_url":"https://api.github.com/users/gpsingh12/gists{/gist_id}","starred_url":"https://api.github.com/users/gpsingh12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gpsingh12/subscriptions","organizations_url":"https://api.github.com/users/gpsingh12/orgs","repos_url":"https://api.github.com/users/gpsingh12/repos","events_url":"https://api.github.com/users/gpsingh12/events{/privacy}","received_events_url":"https://api.github.com/users/gpsingh12/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gpsingh12/is210-week-10-synthesizing","description":"Week #10 Synthesizing Tasks","fork":true,"url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing","forks_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/forks","keys_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/teams","hooks_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/hooks","issue_events_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/issues/events{/number}","events_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/events","assignees_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/assignees{/user}","branches_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/branches{/branch}","tags_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/tags","blobs_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/git/refs{/sha}","trees_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/statuses/{sha}","languages_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/languages","stargazers_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/stargazers","contributors_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/contributors","subscribers_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/subscribers","subscription_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/subscription","commits_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/commits{/sha}","git_commits_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/git/commits{/sha}","comments_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/comments{/number}","issue_comment_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/issues/comments{/number}","contents_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/contents/{+path}","compare_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/merges","archive_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/downloads","issues_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/issues{/number}","pulls_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/pulls{/number}","milestones_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/milestones{/number}","notifications_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/labels{/name}","releases_url":"https://api.github.com/repos/gpsingh12/is210-week-10-synthesizing/releases{/id}","created_at":"2015-04-04T02:07:43Z","updated_at":"2015-04-12T22:29:03Z","pushed_at":"2015-04-12T22:29:01Z","git_url":"git://github.com/gpsingh12/is210-week-10-synthesizing.git","ssh_url":"git@github.com:gpsingh12/is210-week-10-synthesizing.git","clone_url":"https://github.com/gpsingh12/is210-week-10-synthesizing.git","svn_url":"https://github.com/gpsingh12/is210-week-10-synthesizing","homepage":null,"size":105,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"is210-2015-spring-01:gpsingh12","ref":"gpsingh12","sha":"b3b6a5d4c8784b268b9c60c00bb4d5fe053f8bc2","user":{"login":"is210-2015-spring-01","id":10734022,"avatar_url":"https://avatars.githubusercontent.com/u/10734022?v=3","gravatar_id":"","url":"https://api.github.com/users/is210-2015-spring-01","html_url":"https://github.com/is210-2015-spring-01","followers_url":"https://api.github.com/users/is210-2015-spring-01/followers","following_url":"https://api.github.com/users/is210-2015-spring-01/following{/other_user}","gists_url":"https://api.github.com/users/is210-2015-spring-01/gists{/gist_id}","starred_url":"https://api.github.com/users/is210-2015-spring-01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/is210-2015-spring-01/subscriptions","organizations_url":"https://api.github.com/users/is210-2015-spring-01/orgs","repos_url":"https://api.github.com/users/is210-2015-spring-01/repos","events_url":"https://api.github.com/users/is210-2015-spring-01/events{/privacy}","received_events_url":"https://api.github.com/users/is210-2015-spring-01/received_events","type":"Organization","site_admin":false},"repo":{"id":33101749,"name":"is210-week-10-synthesizing","full_name":"is210-2015-spring-01/is210-week-10-synthesizing","owner":{"login":"is210-2015-spring-01","id":10734022,"avatar_url":"https://avatars.githubusercontent.com/u/10734022?v=3","gravatar_id":"","url":"https://api.github.com/users/is210-2015-spring-01","html_url":"https://github.com/is210-2015-spring-01","followers_url":"https://api.github.com/users/is210-2015-spring-01/followers","following_url":"https://api.github.com/users/is210-2015-spring-01/following{/other_user}","gists_url":"https://api.github.com/users/is210-2015-spring-01/gists{/gist_id}","starred_url":"https://api.github.com/users/is210-2015-spring-01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/is210-2015-spring-01/subscriptions","organizations_url":"https://api.github.com/users/is210-2015-spring-01/orgs","repos_url":"https://api.github.com/users/is210-2015-spring-01/repos","events_url":"https://api.github.com/users/is210-2015-spring-01/events{/privacy}","received_events_url":"https://api.github.com/users/is210-2015-spring-01/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/is210-2015-spring-01/is210-week-10-synthesizing","description":"Week #10 Synthesizing Tasks","fork":true,"url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing","forks_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/forks","keys_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/keys{/key_id}","collaborators_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/teams","hooks_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/hooks","issue_events_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/issues/events{/number}","events_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/events","assignees_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/assignees{/user}","branches_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/branches{/branch}","tags_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/tags","blobs_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/git/refs{/sha}","trees_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/git/trees{/sha}","statuses_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/statuses/{sha}","languages_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/languages","stargazers_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/stargazers","contributors_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/contributors","subscribers_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/subscribers","subscription_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/subscription","commits_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/commits{/sha}","git_commits_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/git/commits{/sha}","comments_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/comments{/number}","issue_comment_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/issues/comments{/number}","contents_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/contents/{+path}","compare_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/compare/{base}...{head}","merges_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/merges","archive_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/downloads","issues_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/issues{/number}","pulls_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/pulls{/number}","milestones_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/milestones{/number}","notifications_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/labels{/name}","releases_url":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/releases{/id}","created_at":"2015-03-30T03:40:46Z","updated_at":"2015-04-08T18:38:26Z","pushed_at":"2015-04-13T23:27:03Z","git_url":"git://github.com/is210-2015-spring-01/is210-week-10-synthesizing.git","ssh_url":"git@github.com:is210-2015-spring-01/is210-week-10-synthesizing.git","clone_url":"https://github.com/is210-2015-spring-01/is210-week-10-synthesizing.git","svn_url":"https://github.com/is210-2015-spring-01/is210-week-10-synthesizing","homepage":null,"size":1338,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":5,"forks":13,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/pulls/7"},"html":{"href":"https://github.com/is210-2015-spring-01/is210-week-10-synthesizing/pull/7"},"issue":{"href":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/issues/7"},"comments":{"href":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/is210-2015-spring-01/is210-week-10-synthesizing/statuses/1276322cfc52f18de35d4a6a07a8bcb3b0e45772"}}}}