{"action":"created","issue":{"url":"https://api.github.com/repos/networkx/networkx/issues/1738","labels_url":"https://api.github.com/repos/networkx/networkx/issues/1738/labels{/name}","comments_url":"https://api.github.com/repos/networkx/networkx/issues/1738/comments","events_url":"https://api.github.com/repos/networkx/networkx/issues/1738/events","html_url":"https://github.com/networkx/networkx/issues/1738","id":100832907,"number":1738,"title":"Predecessor Ideas?","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},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-08-13T18:10:44Z","updated_at":"2015-09-01T03:14:29Z","closed_at":null,"body":"Issues #1696 and #1715 seem to suggest that there is demand for an API to access the predecessors dict in a similar way that G[u] accesses the successors dict. I'm opening an issue to collect the discussion on this question.\r\n\r\nG.pred[u] has always been the way I do this, but that refers to a data structure element directly which makes it hard to generalize to new base classes. \r\n    - G.predecessors() and G.in_edges() are what we currently offer. \r\n    - #1696 suggests G.has_predecessor() though that could be written ```0 < len(G.in_edges(u))``` \r\n    - #1715 toyed with switching G.succ and G.pred to reverse the graph. (very shallow copy?)\r\n\r\nShould we add has_predecessor? Should we add an analogue to G[u]? Maybe G.in_edges_dict(u)?\r\nThoughts?"},"comment":{"url":"https://api.github.com/repos/networkx/networkx/issues/comments/136562423","html_url":"https://github.com/networkx/networkx/issues/1738#issuecomment-136562423","issue_url":"https://api.github.com/repos/networkx/networkx/issues/1738","id":136562423,"user":{"login":"MisterSheik","id":730137,"avatar_url":"https://avatars.githubusercontent.com/u/730137?v=3","gravatar_id":"","url":"https://api.github.com/users/MisterSheik","html_url":"https://github.com/MisterSheik","followers_url":"https://api.github.com/users/MisterSheik/followers","following_url":"https://api.github.com/users/MisterSheik/following{/other_user}","gists_url":"https://api.github.com/users/MisterSheik/gists{/gist_id}","starred_url":"https://api.github.com/users/MisterSheik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MisterSheik/subscriptions","organizations_url":"https://api.github.com/users/MisterSheik/orgs","repos_url":"https://api.github.com/users/MisterSheik/repos","events_url":"https://api.github.com/users/MisterSheik/events{/privacy}","received_events_url":"https://api.github.com/users/MisterSheik/received_events","type":"User","site_admin":false},"created_at":"2015-09-01T03:14:29Z","updated_at":"2015-09-01T03:14:29Z","body":"Good point.  I'm not against adding convenience methods :)"}}