{"action":"created","comment":{"url":"https://api.github.com/repos/networkx/networkx/pulls/comments/51810410","id":51810410,"diff_hunk":"@@ -346,40 +368,59 @@ def get_node_attributes(G, name):\n \n \n def set_edge_attributes(G, name, values):\n-    \"\"\"Set edge attributes from dictionary of edge tuples and values.\n+    \"\"\"Sets node attributes from a given value or dictionary of values.\n \n     Parameters\n     ----------\n     G : NetworkX Graph\n \n     name : string\n-       Attribute name\n+       Name of the edge attribute to set.\n \n     values : dict\n-       Dictionary of attribute values keyed by edge (tuple). For multigraphs,\n-       the keys tuples must be of the form (u, v, key). For non-multigraphs,\n-       the keys must be tuples of the form (u, v). If `values` is not a\n-       dictionary, then it is treated as a single attribute value that is then\n-       applied to every edge in `G`.\n+\n+       Dictionary of attribute values keyed by edge (tuple). For\n+       multigraphs, the tuples must be of the form ``(u, v, key)``. For\n+       non-multigraphs, the keys must be tuples of the form ``(u,\n+       v)``.","path":"networkx/classes/function.py","position":123,"original_position":123,"commit_id":"01c7710c142f8c51a2488251f6a90e17e31e781e","original_commit_id":"01c7710c142f8c51a2488251f6a90e17e31e781e","user":{"login":"jfinkels","id":121755,"avatar_url":"https://avatars.githubusercontent.com/u/121755?v=3","gravatar_id":"","url":"https://api.github.com/users/jfinkels","html_url":"https://github.com/jfinkels","followers_url":"https://api.github.com/users/jfinkels/followers","following_url":"https://api.github.com/users/jfinkels/following{/other_user}","gists_url":"https://api.github.com/users/jfinkels/gists{/gist_id}","starred_url":"https://api.github.com/users/jfinkels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfinkels/subscriptions","organizations_url":"https://api.github.com/users/jfinkels/orgs","repos_url":"https://api.github.com/users/jfinkels/repos","events_url":"https://api.github.com/users/jfinkels/events{/privacy}","received_events_url":"https://api.github.com/users/jfinkels/received_events","type":"User","site_admin":false},"body":"Okay, will fix that.","created_at":"2016-02-04T00:09:58Z","updated_at":"2016-02-04T00:09:58Z","html_url":"https://github.com/networkx/networkx/pull/1935#discussion_r51810410","pull_request_url":"https://api.github.com/repos/networkx/networkx/pulls/1935","_links":{"self":{"href":"https://api.github.com/repos/networkx/networkx/pulls/comments/51810410"},"html":{"href":"https://github.com/networkx/networkx/pull/1935#discussion_r51810410"},"pull_request":{"href":"https://api.github.com/repos/networkx/networkx/pulls/1935"}}},"pull_request":{"url":"https://api.github.com/repos/networkx/networkx/pulls/1935","id":55733799,"html_url":"https://github.com/networkx/networkx/pull/1935","diff_url":"https://github.com/networkx/networkx/pull/1935.diff","patch_url":"https://github.com/networkx/networkx/pull/1935.patch","issue_url":"https://api.github.com/repos/networkx/networkx/issues/1935","number":1935,"state":"open","locked":false,"title":"Updates set_{node,edge}_attributes and docs.","user":{"login":"jfinkels","id":121755,"avatar_url":"https://avatars.githubusercontent.com/u/121755?v=3","gravatar_id":"","url":"https://api.github.com/users/jfinkels","html_url":"https://github.com/jfinkels","followers_url":"https://api.github.com/users/jfinkels/followers","following_url":"https://api.github.com/users/jfinkels/following{/other_user}","gists_url":"https://api.github.com/users/jfinkels/gists{/gist_id}","starred_url":"https://api.github.com/users/jfinkels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfinkels/subscriptions","organizations_url":"https://api.github.com/users/jfinkels/orgs","repos_url":"https://api.github.com/users/jfinkels/repos","events_url":"https://api.github.com/users/jfinkels/events{/privacy}","received_events_url":"https://api.github.com/users/jfinkels/received_events","type":"User","site_admin":false},"body":"This commit simplifies `set_node_attributes` and `set_edge_attributes`\r\nby using `zip_longest` in order to avoid creating a list when not\r\nnecessary. It also clarifies the documentation.\r\n\r\nThe documentation change was suggested in issue #1818.","created_at":"2016-01-12T09:42:46Z","updated_at":"2016-02-04T00:09:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4081862dc1a4bdbe81d64c214143e4de40605fb7","assignee":null,"milestone":{"url":"https://api.github.com/repos/networkx/networkx/milestones/3","html_url":"https://github.com/networkx/networkx/milestones/networkx-2.0","labels_url":"https://api.github.com/repos/networkx/networkx/milestones/3/labels","id":236124,"number":3,"title":"networkx-2.0","description":"","creator":{"login":"hagberg","id":187875,"avatar_url":"https://avatars.githubusercontent.com/u/187875?v=3","gravatar_id":"","url":"https://api.github.com/users/hagberg","html_url":"https://github.com/hagberg","followers_url":"https://api.github.com/users/hagberg/followers","following_url":"https://api.github.com/users/hagberg/following{/other_user}","gists_url":"https://api.github.com/users/hagberg/gists{/gist_id}","starred_url":"https://api.github.com/users/hagberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hagberg/subscriptions","organizations_url":"https://api.github.com/users/hagberg/orgs","repos_url":"https://api.github.com/users/hagberg/repos","events_url":"https://api.github.com/users/hagberg/events{/privacy}","received_events_url":"https://api.github.com/users/hagberg/received_events","type":"User","site_admin":false},"open_issues":113,"closed_issues":113,"state":"open","created_at":"2012-12-29T15:43:08Z","updated_at":"2016-02-02T02:28:52Z","due_on":"2016-03-15T06:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/networkx/networkx/pulls/1935/commits","review_comments_url":"https://api.github.com/repos/networkx/networkx/pulls/1935/comments","review_comment_url":"https://api.github.com/repos/networkx/networkx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/networkx/networkx/issues/1935/comments","statuses_url":"https://api.github.com/repos/networkx/networkx/statuses/01c7710c142f8c51a2488251f6a90e17e31e781e","head":{"label":"jfinkels:set-node-attributes-doc","ref":"set-node-attributes-doc","sha":"01c7710c142f8c51a2488251f6a90e17e31e781e","user":{"login":"jfinkels","id":121755,"avatar_url":"https://avatars.githubusercontent.com/u/121755?v=3","gravatar_id":"","url":"https://api.github.com/users/jfinkels","html_url":"https://github.com/jfinkels","followers_url":"https://api.github.com/users/jfinkels/followers","following_url":"https://api.github.com/users/jfinkels/following{/other_user}","gists_url":"https://api.github.com/users/jfinkels/gists{/gist_id}","starred_url":"https://api.github.com/users/jfinkels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfinkels/subscriptions","organizations_url":"https://api.github.com/users/jfinkels/orgs","repos_url":"https://api.github.com/users/jfinkels/repos","events_url":"https://api.github.com/users/jfinkels/events{/privacy}","received_events_url":"https://api.github.com/users/jfinkels/received_events","type":"User","site_admin":false},"repo":{"id":18301430,"name":"networkx","full_name":"jfinkels/networkx","owner":{"login":"jfinkels","id":121755,"avatar_url":"https://avatars.githubusercontent.com/u/121755?v=3","gravatar_id":"","url":"https://api.github.com/users/jfinkels","html_url":"https://github.com/jfinkels","followers_url":"https://api.github.com/users/jfinkels/followers","following_url":"https://api.github.com/users/jfinkels/following{/other_user}","gists_url":"https://api.github.com/users/jfinkels/gists{/gist_id}","starred_url":"https://api.github.com/users/jfinkels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfinkels/subscriptions","organizations_url":"https://api.github.com/users/jfinkels/orgs","repos_url":"https://api.github.com/users/jfinkels/repos","events_url":"https://api.github.com/users/jfinkels/events{/privacy}","received_events_url":"https://api.github.com/users/jfinkels/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jfinkels/networkx","description":"Official NetworkX source code repository.  ","fork":true,"url":"https://api.github.com/repos/jfinkels/networkx","forks_url":"https://api.github.com/repos/jfinkels/networkx/forks","keys_url":"https://api.github.com/repos/jfinkels/networkx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jfinkels/networkx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jfinkels/networkx/teams","hooks_url":"https://api.github.com/repos/jfinkels/networkx/hooks","issue_events_url":"https://api.github.com/repos/jfinkels/networkx/issues/events{/number}","events_url":"https://api.github.com/repos/jfinkels/networkx/events","assignees_url":"https://api.github.com/repos/jfinkels/networkx/assignees{/user}","branches_url":"https://api.github.com/repos/jfinkels/networkx/branches{/branch}","tags_url":"https://api.github.com/repos/jfinkels/networkx/tags","blobs_url":"https://api.github.com/repos/jfinkels/networkx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jfinkels/networkx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jfinkels/networkx/git/refs{/sha}","trees_url":"https://api.github.com/repos/jfinkels/networkx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jfinkels/networkx/statuses/{sha}","languages_url":"https://api.github.com/repos/jfinkels/networkx/languages","stargazers_url":"https://api.github.com/repos/jfinkels/networkx/stargazers","contributors_url":"https://api.github.com/repos/jfinkels/networkx/contributors","subscribers_url":"https://api.github.com/repos/jfinkels/networkx/subscribers","subscription_url":"https://api.github.com/repos/jfinkels/networkx/subscription","commits_url":"https://api.github.com/repos/jfinkels/networkx/commits{/sha}","git_commits_url":"https://api.github.com/repos/jfinkels/networkx/git/commits{/sha}","comments_url":"https://api.github.com/repos/jfinkels/networkx/comments{/number}","issue_comment_url":"https://api.github.com/repos/jfinkels/networkx/issues/comments{/number}","contents_url":"https://api.github.com/repos/jfinkels/networkx/contents/{+path}","compare_url":"https://api.github.com/repos/jfinkels/networkx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jfinkels/networkx/merges","archive_url":"https://api.github.com/repos/jfinkels/networkx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jfinkels/networkx/downloads","issues_url":"https://api.github.com/repos/jfinkels/networkx/issues{/number}","pulls_url":"https://api.github.com/repos/jfinkels/networkx/pulls{/number}","milestones_url":"https://api.github.com/repos/jfinkels/networkx/milestones{/number}","notifications_url":"https://api.github.com/repos/jfinkels/networkx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jfinkels/networkx/labels{/name}","releases_url":"https://api.github.com/repos/jfinkels/networkx/releases{/id}","deployments_url":"https://api.github.com/repos/jfinkels/networkx/deployments","created_at":"2014-03-31T17:19:13Z","updated_at":"2015-05-03T02:01:32Z","pushed_at":"2016-02-04T00:04:11Z","git_url":"git://github.com/jfinkels/networkx.git","ssh_url":"git@github.com:jfinkels/networkx.git","clone_url":"https://github.com/jfinkels/networkx.git","svn_url":"https://github.com/jfinkels/networkx","homepage":"http:/networkx.lanl.gov/","size":14046,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"networkx:master","ref":"master","sha":"b4ebaa353e62de8087a5466bdbedcd91170da3c5","user":{"login":"networkx","id":388785,"avatar_url":"https://avatars.githubusercontent.com/u/388785?v=3","gravatar_id":"","url":"https://api.github.com/users/networkx","html_url":"https://github.com/networkx","followers_url":"https://api.github.com/users/networkx/followers","following_url":"https://api.github.com/users/networkx/following{/other_user}","gists_url":"https://api.github.com/users/networkx/gists{/gist_id}","starred_url":"https://api.github.com/users/networkx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/networkx/subscriptions","organizations_url":"https://api.github.com/users/networkx/orgs","repos_url":"https://api.github.com/users/networkx/repos","events_url":"https://api.github.com/users/networkx/events{/privacy}","received_events_url":"https://api.github.com/users/networkx/received_events","type":"Organization","site_admin":false},"repo":{"id":890377,"name":"networkx","full_name":"networkx/networkx","owner":{"login":"networkx","id":388785,"avatar_url":"https://avatars.githubusercontent.com/u/388785?v=3","gravatar_id":"","url":"https://api.github.com/users/networkx","html_url":"https://github.com/networkx","followers_url":"https://api.github.com/users/networkx/followers","following_url":"https://api.github.com/users/networkx/following{/other_user}","gists_url":"https://api.github.com/users/networkx/gists{/gist_id}","starred_url":"https://api.github.com/users/networkx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/networkx/subscriptions","organizations_url":"https://api.github.com/users/networkx/orgs","repos_url":"https://api.github.com/users/networkx/repos","events_url":"https://api.github.com/users/networkx/events{/privacy}","received_events_url":"https://api.github.com/users/networkx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/networkx/networkx","description":"Official NetworkX source code repository.  ","fork":false,"url":"https://api.github.com/repos/networkx/networkx","forks_url":"https://api.github.com/repos/networkx/networkx/forks","keys_url":"https://api.github.com/repos/networkx/networkx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/networkx/networkx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/networkx/networkx/teams","hooks_url":"https://api.github.com/repos/networkx/networkx/hooks","issue_events_url":"https://api.github.com/repos/networkx/networkx/issues/events{/number}","events_url":"https://api.github.com/repos/networkx/networkx/events","assignees_url":"https://api.github.com/repos/networkx/networkx/assignees{/user}","branches_url":"https://api.github.com/repos/networkx/networkx/branches{/branch}","tags_url":"https://api.github.com/repos/networkx/networkx/tags","blobs_url":"https://api.github.com/repos/networkx/networkx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/networkx/networkx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/networkx/networkx/git/refs{/sha}","trees_url":"https://api.github.com/repos/networkx/networkx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/networkx/networkx/statuses/{sha}","languages_url":"https://api.github.com/repos/networkx/networkx/languages","stargazers_url":"https://api.github.com/repos/networkx/networkx/stargazers","contributors_url":"https://api.github.com/repos/networkx/networkx/contributors","subscribers_url":"https://api.github.com/repos/networkx/networkx/subscribers","subscription_url":"https://api.github.com/repos/networkx/networkx/subscription","commits_url":"https://api.github.com/repos/networkx/networkx/commits{/sha}","git_commits_url":"https://api.github.com/repos/networkx/networkx/git/commits{/sha}","comments_url":"https://api.github.com/repos/networkx/networkx/comments{/number}","issue_comment_url":"https://api.github.com/repos/networkx/networkx/issues/comments{/number}","contents_url":"https://api.github.com/repos/networkx/networkx/contents/{+path}","compare_url":"https://api.github.com/repos/networkx/networkx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/networkx/networkx/merges","archive_url":"https://api.github.com/repos/networkx/networkx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/networkx/networkx/downloads","issues_url":"https://api.github.com/repos/networkx/networkx/issues{/number}","pulls_url":"https://api.github.com/repos/networkx/networkx/pulls{/number}","milestones_url":"https://api.github.com/repos/networkx/networkx/milestones{/number}","notifications_url":"https://api.github.com/repos/networkx/networkx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/networkx/networkx/labels{/name}","releases_url":"https://api.github.com/repos/networkx/networkx/releases{/id}","deployments_url":"https://api.github.com/repos/networkx/networkx/deployments","created_at":"2010-09-06T00:53:44Z","updated_at":"2016-02-03T16:15:17Z","pushed_at":"2016-02-04T00:04:12Z","git_url":"git://github.com/networkx/networkx.git","ssh_url":"git@github.com:networkx/networkx.git","clone_url":"https://github.com/networkx/networkx.git","svn_url":"https://github.com/networkx/networkx","homepage":"http://networkx.github.io","size":18959,"stargazers_count":1889,"watchers_count":1889,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":596,"mirror_url":null,"open_issues_count":263,"forks":596,"open_issues":263,"watchers":1889,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/networkx/networkx/pulls/1935"},"html":{"href":"https://github.com/networkx/networkx/pull/1935"},"issue":{"href":"https://api.github.com/repos/networkx/networkx/issues/1935"},"comments":{"href":"https://api.github.com/repos/networkx/networkx/issues/1935/comments"},"review_comments":{"href":"https://api.github.com/repos/networkx/networkx/pulls/1935/comments"},"review_comment":{"href":"https://api.github.com/repos/networkx/networkx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/networkx/networkx/pulls/1935/commits"},"statuses":{"href":"https://api.github.com/repos/networkx/networkx/statuses/01c7710c142f8c51a2488251f6a90e17e31e781e"}}}}