{"action":"closed","number":2,"pull_request":{"url":"https://api.github.com/repos/dbrgn/result/pulls/2","id":85882419,"html_url":"https://github.com/dbrgn/result/pull/2","diff_url":"https://github.com/dbrgn/result/pull/2.diff","patch_url":"https://github.com/dbrgn/result/pull/2.patch","issue_url":"https://api.github.com/repos/dbrgn/result/issues/2","number":2,"state":"closed","locked":false,"title":"__eq__ magic method","user":{"login":"iwtcs","id":940191,"avatar_url":"https://avatars.githubusercontent.com/u/940191?v=3","gravatar_id":"","url":"https://api.github.com/users/iwtcs","html_url":"https://github.com/iwtcs","followers_url":"https://api.github.com/users/iwtcs/followers","following_url":"https://api.github.com/users/iwtcs/following{/other_user}","gists_url":"https://api.github.com/users/iwtcs/gists{/gist_id}","starred_url":"https://api.github.com/users/iwtcs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iwtcs/subscriptions","organizations_url":"https://api.github.com/users/iwtcs/orgs","repos_url":"https://api.github.com/users/iwtcs/repos","events_url":"https://api.github.com/users/iwtcs/events{/privacy}","received_events_url":"https://api.github.com/users/iwtcs/received_events","type":"User","site_admin":false},"body":"Happy to see this module exists.\r\nI was toying with it the other day and felt I could make my code simpler using a bit of chaining.\r\nSo here are the [and_then](https://doc.rust-lang.org/std/result/enum.Result.html#method.and_then) and [or_else}(https://doc.rust-lang.org/std/result/enum.Result.html#method.or_else) inspired methods.\r\n\r\nI added the kwargs option for more flexibility (and clarity)\r\n\r\nI also added the __eq__  magic method as Ok(1) was not equal to Ok(1)","created_at":"2016-09-19T22:39:16Z","updated_at":"2016-09-21T06:37:13Z","closed_at":"2016-09-21T06:37:13Z","merged_at":"2016-09-21T06:37:12Z","merge_commit_sha":"63351783c5f2b26b6d08d0e3cf29cddf3e6bf349","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/dbrgn/result/pulls/2/commits","review_comments_url":"https://api.github.com/repos/dbrgn/result/pulls/2/comments","review_comment_url":"https://api.github.com/repos/dbrgn/result/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dbrgn/result/issues/2/comments","statuses_url":"https://api.github.com/repos/dbrgn/result/statuses/345ed5f343a80483e38b2d10dff8c71be1888262","head":{"label":"iwtcs:and_then-or_else","ref":"and_then-or_else","sha":"345ed5f343a80483e38b2d10dff8c71be1888262","user":{"login":"iwtcs","id":940191,"avatar_url":"https://avatars.githubusercontent.com/u/940191?v=3","gravatar_id":"","url":"https://api.github.com/users/iwtcs","html_url":"https://github.com/iwtcs","followers_url":"https://api.github.com/users/iwtcs/followers","following_url":"https://api.github.com/users/iwtcs/following{/other_user}","gists_url":"https://api.github.com/users/iwtcs/gists{/gist_id}","starred_url":"https://api.github.com/users/iwtcs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iwtcs/subscriptions","organizations_url":"https://api.github.com/users/iwtcs/orgs","repos_url":"https://api.github.com/users/iwtcs/repos","events_url":"https://api.github.com/users/iwtcs/events{/privacy}","received_events_url":"https://api.github.com/users/iwtcs/received_events","type":"User","site_admin":false},"repo":{"id":68637160,"name":"result","full_name":"iwtcs/result","owner":{"login":"iwtcs","id":940191,"avatar_url":"https://avatars.githubusercontent.com/u/940191?v=3","gravatar_id":"","url":"https://api.github.com/users/iwtcs","html_url":"https://github.com/iwtcs","followers_url":"https://api.github.com/users/iwtcs/followers","following_url":"https://api.github.com/users/iwtcs/following{/other_user}","gists_url":"https://api.github.com/users/iwtcs/gists{/gist_id}","starred_url":"https://api.github.com/users/iwtcs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iwtcs/subscriptions","organizations_url":"https://api.github.com/users/iwtcs/orgs","repos_url":"https://api.github.com/users/iwtcs/repos","events_url":"https://api.github.com/users/iwtcs/events{/privacy}","received_events_url":"https://api.github.com/users/iwtcs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/iwtcs/result","description":"A simple Rust like Result type for Python.","fork":true,"url":"https://api.github.com/repos/iwtcs/result","forks_url":"https://api.github.com/repos/iwtcs/result/forks","keys_url":"https://api.github.com/repos/iwtcs/result/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iwtcs/result/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iwtcs/result/teams","hooks_url":"https://api.github.com/repos/iwtcs/result/hooks","issue_events_url":"https://api.github.com/repos/iwtcs/result/issues/events{/number}","events_url":"https://api.github.com/repos/iwtcs/result/events","assignees_url":"https://api.github.com/repos/iwtcs/result/assignees{/user}","branches_url":"https://api.github.com/repos/iwtcs/result/branches{/branch}","tags_url":"https://api.github.com/repos/iwtcs/result/tags","blobs_url":"https://api.github.com/repos/iwtcs/result/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iwtcs/result/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iwtcs/result/git/refs{/sha}","trees_url":"https://api.github.com/repos/iwtcs/result/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iwtcs/result/statuses/{sha}","languages_url":"https://api.github.com/repos/iwtcs/result/languages","stargazers_url":"https://api.github.com/repos/iwtcs/result/stargazers","contributors_url":"https://api.github.com/repos/iwtcs/result/contributors","subscribers_url":"https://api.github.com/repos/iwtcs/result/subscribers","subscription_url":"https://api.github.com/repos/iwtcs/result/subscription","commits_url":"https://api.github.com/repos/iwtcs/result/commits{/sha}","git_commits_url":"https://api.github.com/repos/iwtcs/result/git/commits{/sha}","comments_url":"https://api.github.com/repos/iwtcs/result/comments{/number}","issue_comment_url":"https://api.github.com/repos/iwtcs/result/issues/comments{/number}","contents_url":"https://api.github.com/repos/iwtcs/result/contents/{+path}","compare_url":"https://api.github.com/repos/iwtcs/result/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iwtcs/result/merges","archive_url":"https://api.github.com/repos/iwtcs/result/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iwtcs/result/downloads","issues_url":"https://api.github.com/repos/iwtcs/result/issues{/number}","pulls_url":"https://api.github.com/repos/iwtcs/result/pulls{/number}","milestones_url":"https://api.github.com/repos/iwtcs/result/milestones{/number}","notifications_url":"https://api.github.com/repos/iwtcs/result/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iwtcs/result/labels{/name}","releases_url":"https://api.github.com/repos/iwtcs/result/releases{/id}","deployments_url":"https://api.github.com/repos/iwtcs/result/deployments","created_at":"2016-09-19T19:07:35Z","updated_at":"2016-09-19T19:07:36Z","pushed_at":"2016-09-20T18:15:43Z","git_url":"git://github.com/iwtcs/result.git","ssh_url":"git@github.com:iwtcs/result.git","clone_url":"https://github.com/iwtcs/result.git","svn_url":"https://github.com/iwtcs/result","homepage":"","size":11,"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":"dbrgn:master","ref":"master","sha":"e289f7213a2597929322b821810052d25f39844f","user":{"login":"dbrgn","id":105168,"avatar_url":"https://avatars.githubusercontent.com/u/105168?v=3","gravatar_id":"","url":"https://api.github.com/users/dbrgn","html_url":"https://github.com/dbrgn","followers_url":"https://api.github.com/users/dbrgn/followers","following_url":"https://api.github.com/users/dbrgn/following{/other_user}","gists_url":"https://api.github.com/users/dbrgn/gists{/gist_id}","starred_url":"https://api.github.com/users/dbrgn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbrgn/subscriptions","organizations_url":"https://api.github.com/users/dbrgn/orgs","repos_url":"https://api.github.com/users/dbrgn/repos","events_url":"https://api.github.com/users/dbrgn/events{/privacy}","received_events_url":"https://api.github.com/users/dbrgn/received_events","type":"User","site_admin":false},"repo":{"id":47977681,"name":"result","full_name":"dbrgn/result","owner":{"login":"dbrgn","id":105168,"avatar_url":"https://avatars.githubusercontent.com/u/105168?v=3","gravatar_id":"","url":"https://api.github.com/users/dbrgn","html_url":"https://github.com/dbrgn","followers_url":"https://api.github.com/users/dbrgn/followers","following_url":"https://api.github.com/users/dbrgn/following{/other_user}","gists_url":"https://api.github.com/users/dbrgn/gists{/gist_id}","starred_url":"https://api.github.com/users/dbrgn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbrgn/subscriptions","organizations_url":"https://api.github.com/users/dbrgn/orgs","repos_url":"https://api.github.com/users/dbrgn/repos","events_url":"https://api.github.com/users/dbrgn/events{/privacy}","received_events_url":"https://api.github.com/users/dbrgn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dbrgn/result","description":"A simple Rust like Result type for Python.","fork":false,"url":"https://api.github.com/repos/dbrgn/result","forks_url":"https://api.github.com/repos/dbrgn/result/forks","keys_url":"https://api.github.com/repos/dbrgn/result/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dbrgn/result/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dbrgn/result/teams","hooks_url":"https://api.github.com/repos/dbrgn/result/hooks","issue_events_url":"https://api.github.com/repos/dbrgn/result/issues/events{/number}","events_url":"https://api.github.com/repos/dbrgn/result/events","assignees_url":"https://api.github.com/repos/dbrgn/result/assignees{/user}","branches_url":"https://api.github.com/repos/dbrgn/result/branches{/branch}","tags_url":"https://api.github.com/repos/dbrgn/result/tags","blobs_url":"https://api.github.com/repos/dbrgn/result/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dbrgn/result/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dbrgn/result/git/refs{/sha}","trees_url":"https://api.github.com/repos/dbrgn/result/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dbrgn/result/statuses/{sha}","languages_url":"https://api.github.com/repos/dbrgn/result/languages","stargazers_url":"https://api.github.com/repos/dbrgn/result/stargazers","contributors_url":"https://api.github.com/repos/dbrgn/result/contributors","subscribers_url":"https://api.github.com/repos/dbrgn/result/subscribers","subscription_url":"https://api.github.com/repos/dbrgn/result/subscription","commits_url":"https://api.github.com/repos/dbrgn/result/commits{/sha}","git_commits_url":"https://api.github.com/repos/dbrgn/result/git/commits{/sha}","comments_url":"https://api.github.com/repos/dbrgn/result/comments{/number}","issue_comment_url":"https://api.github.com/repos/dbrgn/result/issues/comments{/number}","contents_url":"https://api.github.com/repos/dbrgn/result/contents/{+path}","compare_url":"https://api.github.com/repos/dbrgn/result/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dbrgn/result/merges","archive_url":"https://api.github.com/repos/dbrgn/result/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dbrgn/result/downloads","issues_url":"https://api.github.com/repos/dbrgn/result/issues{/number}","pulls_url":"https://api.github.com/repos/dbrgn/result/pulls{/number}","milestones_url":"https://api.github.com/repos/dbrgn/result/milestones{/number}","notifications_url":"https://api.github.com/repos/dbrgn/result/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dbrgn/result/labels{/name}","releases_url":"https://api.github.com/repos/dbrgn/result/releases{/id}","deployments_url":"https://api.github.com/repos/dbrgn/result/deployments","created_at":"2015-12-14T13:49:05Z","updated_at":"2016-09-07T21:52:51Z","pushed_at":"2016-09-21T06:37:12Z","git_url":"git://github.com/dbrgn/result.git","ssh_url":"git@github.com:dbrgn/result.git","clone_url":"https://github.com/dbrgn/result.git","svn_url":"https://github.com/dbrgn/result","homepage":"","size":10,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":0,"forks":2,"open_issues":0,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dbrgn/result/pulls/2"},"html":{"href":"https://github.com/dbrgn/result/pull/2"},"issue":{"href":"https://api.github.com/repos/dbrgn/result/issues/2"},"comments":{"href":"https://api.github.com/repos/dbrgn/result/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/dbrgn/result/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/dbrgn/result/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dbrgn/result/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/dbrgn/result/statuses/345ed5f343a80483e38b2d10dff8c71be1888262"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"dbrgn","id":105168,"avatar_url":"https://avatars.githubusercontent.com/u/105168?v=3","gravatar_id":"","url":"https://api.github.com/users/dbrgn","html_url":"https://github.com/dbrgn","followers_url":"https://api.github.com/users/dbrgn/followers","following_url":"https://api.github.com/users/dbrgn/following{/other_user}","gists_url":"https://api.github.com/users/dbrgn/gists{/gist_id}","starred_url":"https://api.github.com/users/dbrgn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbrgn/subscriptions","organizations_url":"https://api.github.com/users/dbrgn/orgs","repos_url":"https://api.github.com/users/dbrgn/repos","events_url":"https://api.github.com/users/dbrgn/events{/privacy}","received_events_url":"https://api.github.com/users/dbrgn/received_events","type":"User","site_admin":false},"comments":7,"review_comments":0,"commits":3,"additions":12,"deletions":1,"changed_files":3}}
{"actor":{"display_login":"dbrgn"}}