{"action":"closed","number":1336,"pull_request":{"url":"https://api.github.com/repos/networkx/networkx/pulls/1336","id":27566289,"html_url":"https://github.com/networkx/networkx/pull/1336","diff_url":"https://github.com/networkx/networkx/pull/1336.diff","patch_url":"https://github.com/networkx/networkx/pull/1336.patch","issue_url":"https://api.github.com/repos/networkx/networkx/issues/1336","number":1336,"state":"closed","locked":false,"title":"Expand data keyword in G.edges and add default keyword","user":{"login":"dschult","id":915037,"avatar_url":"https://avatars.githubusercontent.com/u/915037?v=3","gravatar_id":"","url":"https://api.github.com/users/dschult","html_url":"https://github.com/dschult","followers_url":"https://api.github.com/users/dschult/followers","following_url":"https://api.github.com/users/dschult/following{/other_user}","gists_url":"https://api.github.com/users/dschult/gists{/gist_id}","starred_url":"https://api.github.com/users/dschult/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dschult/subscriptions","organizations_url":"https://api.github.com/users/dschult/orgs","repos_url":"https://api.github.com/users/dschult/repos","events_url":"https://api.github.com/users/dschult/events{/privacy}","received_events_url":"https://api.github.com/users/dschult/received_events","type":"User","site_admin":false},"body":"This is one feature for the 2.0 API as discussed in #1246 \r\nIt change G.edges in a backward compatible way. \r\n \r\nFor G.edges(data=data)\r\nIf data is True, the whole data dictionary is returned for each edge.\r\nIf data is False, no data is returned.\r\nOtherwise data is used as the attribute name of the edge data to return.\r\n\r\nThe code\r\n    ```[ (u,v,edata['weight']) for u,v,edata in G.edges(data=True) ]```\r\ncan become (either works)\r\n    ```G.edges(data='weight')```\r\n\r\nThe code\r\n\r\n    for n,nbrs in G.adjacency_iter():\r\n        for nbr,ddict in nbrs.items():\r\n            print (n,nbr,ddict.get('weight',1))\r\n\r\ncan become (either works)\r\n    ```G.edges(data='weight', default=1)```","created_at":"2015-01-18T03:25:53Z","updated_at":"2015-01-25T04:02:49Z","closed_at":"2015-01-25T04:02:49Z","merged_at":"2015-01-25T04:02:49Z","merge_commit_sha":"3cb4d3844207782cfde78b469d2411053266b45b","assignee":{"login":"dschult","id":915037,"avatar_url":"https://avatars.githubusercontent.com/u/915037?v=3","gravatar_id":"","url":"https://api.github.com/users/dschult","html_url":"https://github.com/dschult","followers_url":"https://api.github.com/users/dschult/followers","following_url":"https://api.github.com/users/dschult/following{/other_user}","gists_url":"https://api.github.com/users/dschult/gists{/gist_id}","starred_url":"https://api.github.com/users/dschult/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dschult/subscriptions","organizations_url":"https://api.github.com/users/dschult/orgs","repos_url":"https://api.github.com/users/dschult/repos","events_url":"https://api.github.com/users/dschult/events{/privacy}","received_events_url":"https://api.github.com/users/dschult/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/networkx/networkx/milestones/3","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":31,"closed_issues":77,"state":"open","created_at":"2012-12-29T15:43:08Z","updated_at":"2015-01-25T04:02:49Z","due_on":"2015-07-01T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/networkx/networkx/pulls/1336/commits","review_comments_url":"https://api.github.com/repos/networkx/networkx/pulls/1336/comments","review_comment_url":"https://api.github.com/repos/networkx/networkx/pulls/comments/{number}","comments_url":"https://api.github.com/repos/networkx/networkx/issues/1336/comments","statuses_url":"https://api.github.com/repos/networkx/networkx/statuses/bbd42197b0c9342cc46658035e8055a08766f34c","head":{"label":"dschult:edgedata","ref":"edgedata","sha":"bbd42197b0c9342cc46658035e8055a08766f34c","user":{"login":"dschult","id":915037,"avatar_url":"https://avatars.githubusercontent.com/u/915037?v=3","gravatar_id":"","url":"https://api.github.com/users/dschult","html_url":"https://github.com/dschult","followers_url":"https://api.github.com/users/dschult/followers","following_url":"https://api.github.com/users/dschult/following{/other_user}","gists_url":"https://api.github.com/users/dschult/gists{/gist_id}","starred_url":"https://api.github.com/users/dschult/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dschult/subscriptions","organizations_url":"https://api.github.com/users/dschult/orgs","repos_url":"https://api.github.com/users/dschult/repos","events_url":"https://api.github.com/users/dschult/events{/privacy}","received_events_url":"https://api.github.com/users/dschult/received_events","type":"User","site_admin":false},"repo":{"id":2055378,"name":"networkx","full_name":"dschult/networkx","owner":{"login":"dschult","id":915037,"avatar_url":"https://avatars.githubusercontent.com/u/915037?v=3","gravatar_id":"","url":"https://api.github.com/users/dschult","html_url":"https://github.com/dschult","followers_url":"https://api.github.com/users/dschult/followers","following_url":"https://api.github.com/users/dschult/following{/other_user}","gists_url":"https://api.github.com/users/dschult/gists{/gist_id}","starred_url":"https://api.github.com/users/dschult/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dschult/subscriptions","organizations_url":"https://api.github.com/users/dschult/orgs","repos_url":"https://api.github.com/users/dschult/repos","events_url":"https://api.github.com/users/dschult/events{/privacy}","received_events_url":"https://api.github.com/users/dschult/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dschult/networkx","description":"Dan Schult's copy of networkx for messin with","fork":true,"url":"https://api.github.com/repos/dschult/networkx","forks_url":"https://api.github.com/repos/dschult/networkx/forks","keys_url":"https://api.github.com/repos/dschult/networkx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dschult/networkx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dschult/networkx/teams","hooks_url":"https://api.github.com/repos/dschult/networkx/hooks","issue_events_url":"https://api.github.com/repos/dschult/networkx/issues/events{/number}","events_url":"https://api.github.com/repos/dschult/networkx/events","assignees_url":"https://api.github.com/repos/dschult/networkx/assignees{/user}","branches_url":"https://api.github.com/repos/dschult/networkx/branches{/branch}","tags_url":"https://api.github.com/repos/dschult/networkx/tags","blobs_url":"https://api.github.com/repos/dschult/networkx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dschult/networkx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dschult/networkx/git/refs{/sha}","trees_url":"https://api.github.com/repos/dschult/networkx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dschult/networkx/statuses/{sha}","languages_url":"https://api.github.com/repos/dschult/networkx/languages","stargazers_url":"https://api.github.com/repos/dschult/networkx/stargazers","contributors_url":"https://api.github.com/repos/dschult/networkx/contributors","subscribers_url":"https://api.github.com/repos/dschult/networkx/subscribers","subscription_url":"https://api.github.com/repos/dschult/networkx/subscription","commits_url":"https://api.github.com/repos/dschult/networkx/commits{/sha}","git_commits_url":"https://api.github.com/repos/dschult/networkx/git/commits{/sha}","comments_url":"https://api.github.com/repos/dschult/networkx/comments{/number}","issue_comment_url":"https://api.github.com/repos/dschult/networkx/issues/comments/{number}","contents_url":"https://api.github.com/repos/dschult/networkx/contents/{+path}","compare_url":"https://api.github.com/repos/dschult/networkx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dschult/networkx/merges","archive_url":"https://api.github.com/repos/dschult/networkx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dschult/networkx/downloads","issues_url":"https://api.github.com/repos/dschult/networkx/issues{/number}","pulls_url":"https://api.github.com/repos/dschult/networkx/pulls{/number}","milestones_url":"https://api.github.com/repos/dschult/networkx/milestones{/number}","notifications_url":"https://api.github.com/repos/dschult/networkx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dschult/networkx/labels{/name}","releases_url":"https://api.github.com/repos/dschult/networkx/releases{/id}","created_at":"2011-07-15T20:14:13Z","updated_at":"2015-01-18T18:00:39Z","pushed_at":"2015-01-18T18:37:16Z","git_url":"git://github.com/dschult/networkx.git","ssh_url":"git@github.com:dschult/networkx.git","clone_url":"https://github.com/dschult/networkx.git","svn_url":"https://github.com/dschult/networkx","homepage":"http:/networkx.github.com","size":13077,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"networkx:master","ref":"master","sha":"74e0b8d695649b63ea793cfa784e6dad7244c47f","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}","created_at":"2010-09-06T00:53:44Z","updated_at":"2015-01-24T19:36:53Z","pushed_at":"2015-01-25T04:02:49Z","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":19940,"stargazers_count":1170,"watchers_count":1170,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":354,"mirror_url":null,"open_issues_count":144,"forks":354,"open_issues":144,"watchers":1170,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/networkx/networkx/pulls/1336"},"html":{"href":"https://github.com/networkx/networkx/pull/1336"},"issue":{"href":"https://api.github.com/repos/networkx/networkx/issues/1336"},"comments":{"href":"https://api.github.com/repos/networkx/networkx/issues/1336/comments"},"review_comments":{"href":"https://api.github.com/repos/networkx/networkx/pulls/1336/comments"},"review_comment":{"href":"https://api.github.com/repos/networkx/networkx/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/networkx/networkx/pulls/1336/commits"},"statuses":{"href":"https://api.github.com/repos/networkx/networkx/statuses/bbd42197b0c9342cc46658035e8055a08766f34c"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"chebee7i","id":326005,"avatar_url":"https://avatars.githubusercontent.com/u/326005?v=3","gravatar_id":"","url":"https://api.github.com/users/chebee7i","html_url":"https://github.com/chebee7i","followers_url":"https://api.github.com/users/chebee7i/followers","following_url":"https://api.github.com/users/chebee7i/following{/other_user}","gists_url":"https://api.github.com/users/chebee7i/gists{/gist_id}","starred_url":"https://api.github.com/users/chebee7i/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chebee7i/subscriptions","organizations_url":"https://api.github.com/users/chebee7i/orgs","repos_url":"https://api.github.com/users/chebee7i/repos","events_url":"https://api.github.com/users/chebee7i/events{/privacy}","received_events_url":"https://api.github.com/users/chebee7i/received_events","type":"User","site_admin":false},"comments":2,"review_comments":0,"commits":1,"additions":178,"deletions":87,"changed_files":6}}