{"action":"created","comment":{"url":"https://api.github.com/repos/bsc-s2/pykit/pulls/comments/180319790","pull_request_review_id":110719092,"id":180319790,"diff_hunk":"@@ -360,30 +360,32 @@ def _attrdict(attrdict_clz, d, ref):\n \n \n def combineto(a, b, op, exclude=None, recursive=True):\n+\n     if not isinstance(b, dict):\n         return a\n \n     if exclude is None:\n         exclude = {}\n \n-    for k, v in b.iteritems():\n+    for k, vb in b.iteritems():\n         sub_exclude = exclude.get(k)\n \n         if sub_exclude is True:\n             continue\n \n-        if isinstance(v, dict) and recursive == False:\n-            continue\n-\n         if k not in a:\n-            a[k] = copy.deepcopy(v)\n-            continue\n-\n-        if isinstance(a[k], dict):\n-            combineto(a[k], v, op, exclude=sub_exclude, recursive=recursive)\n-            continue\n+            # use the default constructor of `vb` to get a `zero` value.\n+            va = type(vb)()","path":"dictutil/dictutil.py","position":29,"original_position":29,"commit_id":"4de8aa255b88a9b943a38c042df65306186a9a40","original_commit_id":"4de8aa255b88a9b943a38c042df65306186a9a40","user":{"login":"drmingdrmer","id":44069,"avatar_url":"https://avatars0.githubusercontent.com/u/44069?v=4","gravatar_id":"","url":"https://api.github.com/users/drmingdrmer","html_url":"https://github.com/drmingdrmer","followers_url":"https://api.github.com/users/drmingdrmer/followers","following_url":"https://api.github.com/users/drmingdrmer/following{/other_user}","gists_url":"https://api.github.com/users/drmingdrmer/gists{/gist_id}","starred_url":"https://api.github.com/users/drmingdrmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drmingdrmer/subscriptions","organizations_url":"https://api.github.com/users/drmingdrmer/orgs","repos_url":"https://api.github.com/users/drmingdrmer/repos","events_url":"https://api.github.com/users/drmingdrmer/events{/privacy}","received_events_url":"https://api.github.com/users/drmingdrmer/received_events","type":"User","site_admin":false},"body":"`addto({}, {'a': 2}) --> {'a': 2}`","created_at":"2018-04-10T07:27:44Z","updated_at":"2018-04-10T07:27:44Z","html_url":"https://github.com/bsc-s2/pykit/pull/199#discussion_r180319790","pull_request_url":"https://api.github.com/repos/bsc-s2/pykit/pulls/199","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/bsc-s2/pykit/pulls/comments/180319790"},"html":{"href":"https://github.com/bsc-s2/pykit/pull/199#discussion_r180319790"},"pull_request":{"href":"https://api.github.com/repos/bsc-s2/pykit/pulls/199"}},"in_reply_to_id":180311114},"pull_request":{"url":"https://api.github.com/repos/bsc-s2/pykit/pulls/199","id":180500632,"html_url":"https://github.com/bsc-s2/pykit/pull/199","diff_url":"https://github.com/bsc-s2/pykit/pull/199.diff","patch_url":"https://github.com/bsc-s2/pykit/pull/199.patch","issue_url":"https://api.github.com/repos/bsc-s2/pykit/issues/199","number":199,"state":"open","locked":false,"title":"Simplify dictutil.combineto and add test.","user":{"login":"drmingdrmer","id":44069,"avatar_url":"https://avatars0.githubusercontent.com/u/44069?v=4","gravatar_id":"","url":"https://api.github.com/users/drmingdrmer","html_url":"https://github.com/drmingdrmer","followers_url":"https://api.github.com/users/drmingdrmer/followers","following_url":"https://api.github.com/users/drmingdrmer/following{/other_user}","gists_url":"https://api.github.com/users/drmingdrmer/gists{/gist_id}","starred_url":"https://api.github.com/users/drmingdrmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drmingdrmer/subscriptions","organizations_url":"https://api.github.com/users/drmingdrmer/orgs","repos_url":"https://api.github.com/users/drmingdrmer/repos","events_url":"https://api.github.com/users/drmingdrmer/events{/privacy}","received_events_url":"https://api.github.com/users/drmingdrmer/received_events","type":"User","site_admin":false},"body":"- Fix: tests should use absent kwargs instead of `k=None`.\r\n- add test of zero for absent key: addto({}, {'a': 2}) --> {'a': 2}","created_at":"2018-04-10T06:24:18Z","updated_at":"2018-04-10T07:27:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"abdb1707efabdd6031309797db84b971314a9791","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/bsc-s2/pykit/pulls/199/commits","review_comments_url":"https://api.github.com/repos/bsc-s2/pykit/pulls/199/comments","review_comment_url":"https://api.github.com/repos/bsc-s2/pykit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bsc-s2/pykit/issues/199/comments","statuses_url":"https://api.github.com/repos/bsc-s2/pykit/statuses/4de8aa255b88a9b943a38c042df65306186a9a40","head":{"label":"bsc-s2:xp-fix-combineto","ref":"xp-fix-combineto","sha":"4de8aa255b88a9b943a38c042df65306186a9a40","user":{"login":"bsc-s2","id":36946445,"avatar_url":"https://avatars3.githubusercontent.com/u/36946445?v=4","gravatar_id":"","url":"https://api.github.com/users/bsc-s2","html_url":"https://github.com/bsc-s2","followers_url":"https://api.github.com/users/bsc-s2/followers","following_url":"https://api.github.com/users/bsc-s2/following{/other_user}","gists_url":"https://api.github.com/users/bsc-s2/gists{/gist_id}","starred_url":"https://api.github.com/users/bsc-s2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsc-s2/subscriptions","organizations_url":"https://api.github.com/users/bsc-s2/orgs","repos_url":"https://api.github.com/users/bsc-s2/repos","events_url":"https://api.github.com/users/bsc-s2/events{/privacy}","received_events_url":"https://api.github.com/users/bsc-s2/received_events","type":"Organization","site_admin":false},"repo":{"id":75464992,"name":"pykit","full_name":"bsc-s2/pykit","owner":{"login":"bsc-s2","id":36946445,"avatar_url":"https://avatars3.githubusercontent.com/u/36946445?v=4","gravatar_id":"","url":"https://api.github.com/users/bsc-s2","html_url":"https://github.com/bsc-s2","followers_url":"https://api.github.com/users/bsc-s2/followers","following_url":"https://api.github.com/users/bsc-s2/following{/other_user}","gists_url":"https://api.github.com/users/bsc-s2/gists{/gist_id}","starred_url":"https://api.github.com/users/bsc-s2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsc-s2/subscriptions","organizations_url":"https://api.github.com/users/bsc-s2/orgs","repos_url":"https://api.github.com/users/bsc-s2/repos","events_url":"https://api.github.com/users/bsc-s2/events{/privacy}","received_events_url":"https://api.github.com/users/bsc-s2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bsc-s2/pykit","description":"a collection of toolkit lib for distributed system development in python","fork":false,"url":"https://api.github.com/repos/bsc-s2/pykit","forks_url":"https://api.github.com/repos/bsc-s2/pykit/forks","keys_url":"https://api.github.com/repos/bsc-s2/pykit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bsc-s2/pykit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bsc-s2/pykit/teams","hooks_url":"https://api.github.com/repos/bsc-s2/pykit/hooks","issue_events_url":"https://api.github.com/repos/bsc-s2/pykit/issues/events{/number}","events_url":"https://api.github.com/repos/bsc-s2/pykit/events","assignees_url":"https://api.github.com/repos/bsc-s2/pykit/assignees{/user}","branches_url":"https://api.github.com/repos/bsc-s2/pykit/branches{/branch}","tags_url":"https://api.github.com/repos/bsc-s2/pykit/tags","blobs_url":"https://api.github.com/repos/bsc-s2/pykit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bsc-s2/pykit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bsc-s2/pykit/git/refs{/sha}","trees_url":"https://api.github.com/repos/bsc-s2/pykit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bsc-s2/pykit/statuses/{sha}","languages_url":"https://api.github.com/repos/bsc-s2/pykit/languages","stargazers_url":"https://api.github.com/repos/bsc-s2/pykit/stargazers","contributors_url":"https://api.github.com/repos/bsc-s2/pykit/contributors","subscribers_url":"https://api.github.com/repos/bsc-s2/pykit/subscribers","subscription_url":"https://api.github.com/repos/bsc-s2/pykit/subscription","commits_url":"https://api.github.com/repos/bsc-s2/pykit/commits{/sha}","git_commits_url":"https://api.github.com/repos/bsc-s2/pykit/git/commits{/sha}","comments_url":"https://api.github.com/repos/bsc-s2/pykit/comments{/number}","issue_comment_url":"https://api.github.com/repos/bsc-s2/pykit/issues/comments{/number}","contents_url":"https://api.github.com/repos/bsc-s2/pykit/contents/{+path}","compare_url":"https://api.github.com/repos/bsc-s2/pykit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bsc-s2/pykit/merges","archive_url":"https://api.github.com/repos/bsc-s2/pykit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bsc-s2/pykit/downloads","issues_url":"https://api.github.com/repos/bsc-s2/pykit/issues{/number}","pulls_url":"https://api.github.com/repos/bsc-s2/pykit/pulls{/number}","milestones_url":"https://api.github.com/repos/bsc-s2/pykit/milestones{/number}","notifications_url":"https://api.github.com/repos/bsc-s2/pykit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bsc-s2/pykit/labels{/name}","releases_url":"https://api.github.com/repos/bsc-s2/pykit/releases{/id}","deployments_url":"https://api.github.com/repos/bsc-s2/pykit/deployments","created_at":"2016-12-03T09:38:38Z","updated_at":"2018-04-09T12:03:48Z","pushed_at":"2018-04-10T06:25:09Z","git_url":"git://github.com/bsc-s2/pykit.git","ssh_url":"git@github.com:bsc-s2/pykit.git","clone_url":"https://github.com/bsc-s2/pykit.git","svn_url":"https://github.com/bsc-s2/pykit","homepage":null,"size":3086,"stargazers_count":10,"watchers_count":10,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":20,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":5,"open_issues":20,"watchers":10,"default_branch":"master"}},"base":{"label":"bsc-s2:master","ref":"master","sha":"9cecc30aff920ddca79361ad65ba94773dec1d8f","user":{"login":"bsc-s2","id":36946445,"avatar_url":"https://avatars3.githubusercontent.com/u/36946445?v=4","gravatar_id":"","url":"https://api.github.com/users/bsc-s2","html_url":"https://github.com/bsc-s2","followers_url":"https://api.github.com/users/bsc-s2/followers","following_url":"https://api.github.com/users/bsc-s2/following{/other_user}","gists_url":"https://api.github.com/users/bsc-s2/gists{/gist_id}","starred_url":"https://api.github.com/users/bsc-s2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsc-s2/subscriptions","organizations_url":"https://api.github.com/users/bsc-s2/orgs","repos_url":"https://api.github.com/users/bsc-s2/repos","events_url":"https://api.github.com/users/bsc-s2/events{/privacy}","received_events_url":"https://api.github.com/users/bsc-s2/received_events","type":"Organization","site_admin":false},"repo":{"id":75464992,"name":"pykit","full_name":"bsc-s2/pykit","owner":{"login":"bsc-s2","id":36946445,"avatar_url":"https://avatars3.githubusercontent.com/u/36946445?v=4","gravatar_id":"","url":"https://api.github.com/users/bsc-s2","html_url":"https://github.com/bsc-s2","followers_url":"https://api.github.com/users/bsc-s2/followers","following_url":"https://api.github.com/users/bsc-s2/following{/other_user}","gists_url":"https://api.github.com/users/bsc-s2/gists{/gist_id}","starred_url":"https://api.github.com/users/bsc-s2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsc-s2/subscriptions","organizations_url":"https://api.github.com/users/bsc-s2/orgs","repos_url":"https://api.github.com/users/bsc-s2/repos","events_url":"https://api.github.com/users/bsc-s2/events{/privacy}","received_events_url":"https://api.github.com/users/bsc-s2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bsc-s2/pykit","description":"a collection of toolkit lib for distributed system development in python","fork":false,"url":"https://api.github.com/repos/bsc-s2/pykit","forks_url":"https://api.github.com/repos/bsc-s2/pykit/forks","keys_url":"https://api.github.com/repos/bsc-s2/pykit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bsc-s2/pykit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bsc-s2/pykit/teams","hooks_url":"https://api.github.com/repos/bsc-s2/pykit/hooks","issue_events_url":"https://api.github.com/repos/bsc-s2/pykit/issues/events{/number}","events_url":"https://api.github.com/repos/bsc-s2/pykit/events","assignees_url":"https://api.github.com/repos/bsc-s2/pykit/assignees{/user}","branches_url":"https://api.github.com/repos/bsc-s2/pykit/branches{/branch}","tags_url":"https://api.github.com/repos/bsc-s2/pykit/tags","blobs_url":"https://api.github.com/repos/bsc-s2/pykit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bsc-s2/pykit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bsc-s2/pykit/git/refs{/sha}","trees_url":"https://api.github.com/repos/bsc-s2/pykit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bsc-s2/pykit/statuses/{sha}","languages_url":"https://api.github.com/repos/bsc-s2/pykit/languages","stargazers_url":"https://api.github.com/repos/bsc-s2/pykit/stargazers","contributors_url":"https://api.github.com/repos/bsc-s2/pykit/contributors","subscribers_url":"https://api.github.com/repos/bsc-s2/pykit/subscribers","subscription_url":"https://api.github.com/repos/bsc-s2/pykit/subscription","commits_url":"https://api.github.com/repos/bsc-s2/pykit/commits{/sha}","git_commits_url":"https://api.github.com/repos/bsc-s2/pykit/git/commits{/sha}","comments_url":"https://api.github.com/repos/bsc-s2/pykit/comments{/number}","issue_comment_url":"https://api.github.com/repos/bsc-s2/pykit/issues/comments{/number}","contents_url":"https://api.github.com/repos/bsc-s2/pykit/contents/{+path}","compare_url":"https://api.github.com/repos/bsc-s2/pykit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bsc-s2/pykit/merges","archive_url":"https://api.github.com/repos/bsc-s2/pykit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bsc-s2/pykit/downloads","issues_url":"https://api.github.com/repos/bsc-s2/pykit/issues{/number}","pulls_url":"https://api.github.com/repos/bsc-s2/pykit/pulls{/number}","milestones_url":"https://api.github.com/repos/bsc-s2/pykit/milestones{/number}","notifications_url":"https://api.github.com/repos/bsc-s2/pykit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bsc-s2/pykit/labels{/name}","releases_url":"https://api.github.com/repos/bsc-s2/pykit/releases{/id}","deployments_url":"https://api.github.com/repos/bsc-s2/pykit/deployments","created_at":"2016-12-03T09:38:38Z","updated_at":"2018-04-09T12:03:48Z","pushed_at":"2018-04-10T06:25:09Z","git_url":"git://github.com/bsc-s2/pykit.git","ssh_url":"git@github.com:bsc-s2/pykit.git","clone_url":"https://github.com/bsc-s2/pykit.git","svn_url":"https://github.com/bsc-s2/pykit","homepage":null,"size":3086,"stargazers_count":10,"watchers_count":10,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":20,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":5,"open_issues":20,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bsc-s2/pykit/pulls/199"},"html":{"href":"https://github.com/bsc-s2/pykit/pull/199"},"issue":{"href":"https://api.github.com/repos/bsc-s2/pykit/issues/199"},"comments":{"href":"https://api.github.com/repos/bsc-s2/pykit/issues/199/comments"},"review_comments":{"href":"https://api.github.com/repos/bsc-s2/pykit/pulls/199/comments"},"review_comment":{"href":"https://api.github.com/repos/bsc-s2/pykit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bsc-s2/pykit/pulls/199/commits"},"statuses":{"href":"https://api.github.com/repos/bsc-s2/pykit/statuses/4de8aa255b88a9b943a38c042df65306186a9a40"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"drmingdrmer"}}