{"action":"created","comment":{"url":"https://api.github.com/repos/jefferyrayrussell/data-structures/pulls/comments/75787504","id":75787504,"diff_hunk":"@@ -47,39 +47,36 @@ def pop(self):\n             self.header = pop_node.pointer\n             self.length -= 1\n             return pop_node.value\n+        else:\n+            raise IndexError('Cannot pop from an empty list.')\n \n     def display(self):\n         \"\"\"Return a unicode string representing the list.\"\"\"\n         if self.length:\n+            return_str = '{0}{1}{2}'.format('(', self.header.value, ', ')\n             current_node = self.header\n-            return_str = '('\n             while current_node.pointer:\n-                my_value = current_node.value\n+                my_value = current_node.pointer.value\n                 return_str += '{0}{1}'.format(my_value, ', ')\n                 current_node = current_node.pointer\n             else:\n-                my_value = current_node.value\n-                return_str += u'{0}{1}'.format(my_value, ')')\n+                return_str = return_str.rstrip(', ') + ')'\n             return return_str\n \n     def search(self, val):\n         \"\"\"Return the node containing a 'val' in the list.\"\"\"\n         if self.length:\n+            if self.header.value == val:\n+                return self.header\n+\n             current_node = self.header\n             while current_node.pointer:\n-                if current_node.value == val:\n-                    return current_node\n+                if current_node.pointer.value == val:\n+                    return current_node.pointer\n                 current_node = current_node.pointer\n-            else:\n-                if current_node.value == val:\n-                    return current_node\n \n     def remove(self, remove_node):","path":"src/linked_list.py","position":67,"original_position":67,"commit_id":"efdbc00b8bd76f7cfa11ee84809343d3827a38b5","original_commit_id":"efdbc00b8bd76f7cfa11ee84809343d3827a38b5","user":{"login":"nhuntwalker","id":5581888,"avatar_url":"https://avatars.githubusercontent.com/u/5581888?v=3","gravatar_id":"","url":"https://api.github.com/users/nhuntwalker","html_url":"https://github.com/nhuntwalker","followers_url":"https://api.github.com/users/nhuntwalker/followers","following_url":"https://api.github.com/users/nhuntwalker/following{/other_user}","gists_url":"https://api.github.com/users/nhuntwalker/gists{/gist_id}","starred_url":"https://api.github.com/users/nhuntwalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhuntwalker/subscriptions","organizations_url":"https://api.github.com/users/nhuntwalker/orgs","repos_url":"https://api.github.com/users/nhuntwalker/repos","events_url":"https://api.github.com/users/nhuntwalker/events{/privacy}","received_events_url":"https://api.github.com/users/nhuntwalker/received_events","type":"User","site_admin":false},"body":"What happens if the node that you want to remove is the head node? You're only checking what every node points to, not the first one.","created_at":"2016-08-23T01:01:30Z","updated_at":"2016-08-23T01:01:30Z","html_url":"https://github.com/jefferyrayrussell/data-structures/pull/4#discussion_r75787504","pull_request_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/jefferyrayrussell/data-structures/pulls/comments/75787504"},"html":{"href":"https://github.com/jefferyrayrussell/data-structures/pull/4#discussion_r75787504"},"pull_request":{"href":"https://api.github.com/repos/jefferyrayrussell/data-structures/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/jefferyrayrussell/data-structures/pulls/4","id":82082150,"html_url":"https://github.com/jefferyrayrussell/data-structures/pull/4","diff_url":"https://github.com/jefferyrayrussell/data-structures/pull/4.diff","patch_url":"https://github.com/jefferyrayrussell/data-structures/pull/4.patch","issue_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/issues/4","number":4,"state":"closed","locked":false,"title":"Ll updates","user":{"login":"zachrickert","id":10875167,"avatar_url":"https://avatars.githubusercontent.com/u/10875167?v=3","gravatar_id":"","url":"https://api.github.com/users/zachrickert","html_url":"https://github.com/zachrickert","followers_url":"https://api.github.com/users/zachrickert/followers","following_url":"https://api.github.com/users/zachrickert/following{/other_user}","gists_url":"https://api.github.com/users/zachrickert/gists{/gist_id}","starred_url":"https://api.github.com/users/zachrickert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zachrickert/subscriptions","organizations_url":"https://api.github.com/users/zachrickert/orgs","repos_url":"https://api.github.com/users/zachrickert/repos","events_url":"https://api.github.com/users/zachrickert/events{/privacy}","received_events_url":"https://api.github.com/users/zachrickert/received_events","type":"User","site_admin":false},"body":"update the singly linked list implementation from comments by Cris.","created_at":"2016-08-20T15:58:29Z","updated_at":"2016-08-23T01:01:30Z","closed_at":"2016-08-20T21:39:35Z","merged_at":"2016-08-20T21:39:35Z","merge_commit_sha":"d4ef44e9fd4bb8a3ca0ef93984cda30a4362f12f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/pulls/4/commits","review_comments_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/pulls/4/comments","review_comment_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/issues/4/comments","statuses_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/statuses/efdbc00b8bd76f7cfa11ee84809343d3827a38b5","head":{"label":"jefferyrayrussell:ll-updates","ref":"ll-updates","sha":"efdbc00b8bd76f7cfa11ee84809343d3827a38b5","user":{"login":"jefferyrayrussell","id":16262837,"avatar_url":"https://avatars.githubusercontent.com/u/16262837?v=3","gravatar_id":"","url":"https://api.github.com/users/jefferyrayrussell","html_url":"https://github.com/jefferyrayrussell","followers_url":"https://api.github.com/users/jefferyrayrussell/followers","following_url":"https://api.github.com/users/jefferyrayrussell/following{/other_user}","gists_url":"https://api.github.com/users/jefferyrayrussell/gists{/gist_id}","starred_url":"https://api.github.com/users/jefferyrayrussell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jefferyrayrussell/subscriptions","organizations_url":"https://api.github.com/users/jefferyrayrussell/orgs","repos_url":"https://api.github.com/users/jefferyrayrussell/repos","events_url":"https://api.github.com/users/jefferyrayrussell/events{/privacy}","received_events_url":"https://api.github.com/users/jefferyrayrussell/received_events","type":"User","site_admin":false},"repo":{"id":65762151,"name":"data-structures","full_name":"jefferyrayrussell/data-structures","owner":{"login":"jefferyrayrussell","id":16262837,"avatar_url":"https://avatars.githubusercontent.com/u/16262837?v=3","gravatar_id":"","url":"https://api.github.com/users/jefferyrayrussell","html_url":"https://github.com/jefferyrayrussell","followers_url":"https://api.github.com/users/jefferyrayrussell/followers","following_url":"https://api.github.com/users/jefferyrayrussell/following{/other_user}","gists_url":"https://api.github.com/users/jefferyrayrussell/gists{/gist_id}","starred_url":"https://api.github.com/users/jefferyrayrussell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jefferyrayrussell/subscriptions","organizations_url":"https://api.github.com/users/jefferyrayrussell/orgs","repos_url":"https://api.github.com/users/jefferyrayrussell/repos","events_url":"https://api.github.com/users/jefferyrayrussell/events{/privacy}","received_events_url":"https://api.github.com/users/jefferyrayrussell/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jefferyrayrussell/data-structures","description":"Classic Data Structure Assignments","fork":false,"url":"https://api.github.com/repos/jefferyrayrussell/data-structures","forks_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/forks","keys_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/teams","hooks_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/hooks","issue_events_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/issues/events{/number}","events_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/events","assignees_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/assignees{/user}","branches_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/branches{/branch}","tags_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/tags","blobs_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/git/refs{/sha}","trees_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/statuses/{sha}","languages_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/languages","stargazers_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/stargazers","contributors_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/contributors","subscribers_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/subscribers","subscription_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/subscription","commits_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/commits{/sha}","git_commits_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/git/commits{/sha}","comments_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/comments{/number}","issue_comment_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/issues/comments{/number}","contents_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/contents/{+path}","compare_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/merges","archive_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/downloads","issues_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/issues{/number}","pulls_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/pulls{/number}","milestones_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/milestones{/number}","notifications_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/labels{/name}","releases_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/releases{/id}","deployments_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/deployments","created_at":"2016-08-15T20:17:41Z","updated_at":"2016-08-17T21:08:11Z","pushed_at":"2016-08-22T23:07:56Z","git_url":"git://github.com/jefferyrayrussell/data-structures.git","ssh_url":"git@github.com:jefferyrayrussell/data-structures.git","clone_url":"https://github.com/jefferyrayrussell/data-structures.git","svn_url":"https://github.com/jefferyrayrussell/data-structures","homepage":null,"size":40,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"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":"jefferyrayrussell:master","ref":"master","sha":"ca80d1e88a3796d1473cce4004fd060bd595dc4d","user":{"login":"jefferyrayrussell","id":16262837,"avatar_url":"https://avatars.githubusercontent.com/u/16262837?v=3","gravatar_id":"","url":"https://api.github.com/users/jefferyrayrussell","html_url":"https://github.com/jefferyrayrussell","followers_url":"https://api.github.com/users/jefferyrayrussell/followers","following_url":"https://api.github.com/users/jefferyrayrussell/following{/other_user}","gists_url":"https://api.github.com/users/jefferyrayrussell/gists{/gist_id}","starred_url":"https://api.github.com/users/jefferyrayrussell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jefferyrayrussell/subscriptions","organizations_url":"https://api.github.com/users/jefferyrayrussell/orgs","repos_url":"https://api.github.com/users/jefferyrayrussell/repos","events_url":"https://api.github.com/users/jefferyrayrussell/events{/privacy}","received_events_url":"https://api.github.com/users/jefferyrayrussell/received_events","type":"User","site_admin":false},"repo":{"id":65762151,"name":"data-structures","full_name":"jefferyrayrussell/data-structures","owner":{"login":"jefferyrayrussell","id":16262837,"avatar_url":"https://avatars.githubusercontent.com/u/16262837?v=3","gravatar_id":"","url":"https://api.github.com/users/jefferyrayrussell","html_url":"https://github.com/jefferyrayrussell","followers_url":"https://api.github.com/users/jefferyrayrussell/followers","following_url":"https://api.github.com/users/jefferyrayrussell/following{/other_user}","gists_url":"https://api.github.com/users/jefferyrayrussell/gists{/gist_id}","starred_url":"https://api.github.com/users/jefferyrayrussell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jefferyrayrussell/subscriptions","organizations_url":"https://api.github.com/users/jefferyrayrussell/orgs","repos_url":"https://api.github.com/users/jefferyrayrussell/repos","events_url":"https://api.github.com/users/jefferyrayrussell/events{/privacy}","received_events_url":"https://api.github.com/users/jefferyrayrussell/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jefferyrayrussell/data-structures","description":"Classic Data Structure Assignments","fork":false,"url":"https://api.github.com/repos/jefferyrayrussell/data-structures","forks_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/forks","keys_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/teams","hooks_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/hooks","issue_events_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/issues/events{/number}","events_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/events","assignees_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/assignees{/user}","branches_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/branches{/branch}","tags_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/tags","blobs_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/git/refs{/sha}","trees_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/statuses/{sha}","languages_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/languages","stargazers_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/stargazers","contributors_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/contributors","subscribers_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/subscribers","subscription_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/subscription","commits_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/commits{/sha}","git_commits_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/git/commits{/sha}","comments_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/comments{/number}","issue_comment_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/issues/comments{/number}","contents_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/contents/{+path}","compare_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/merges","archive_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/downloads","issues_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/issues{/number}","pulls_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/pulls{/number}","milestones_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/milestones{/number}","notifications_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/labels{/name}","releases_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/releases{/id}","deployments_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/deployments","created_at":"2016-08-15T20:17:41Z","updated_at":"2016-08-17T21:08:11Z","pushed_at":"2016-08-22T23:07:56Z","git_url":"git://github.com/jefferyrayrussell/data-structures.git","ssh_url":"git@github.com:jefferyrayrussell/data-structures.git","clone_url":"https://github.com/jefferyrayrussell/data-structures.git","svn_url":"https://github.com/jefferyrayrussell/data-structures","homepage":null,"size":40,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"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"}},"_links":{"self":{"href":"https://api.github.com/repos/jefferyrayrussell/data-structures/pulls/4"},"html":{"href":"https://github.com/jefferyrayrussell/data-structures/pull/4"},"issue":{"href":"https://api.github.com/repos/jefferyrayrussell/data-structures/issues/4"},"comments":{"href":"https://api.github.com/repos/jefferyrayrussell/data-structures/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/jefferyrayrussell/data-structures/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/jefferyrayrussell/data-structures/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jefferyrayrussell/data-structures/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/jefferyrayrussell/data-structures/statuses/efdbc00b8bd76f7cfa11ee84809343d3827a38b5"}}}}
{"actor":{"display_login":"nhuntwalker"}}