{"action":"created","comment":{"url":"https://api.github.com/repos/jefferyrayrussell/data-structures/pulls/comments/75410190","id":75410190,"diff_hunk":"@@ -0,0 +1,89 @@\n+# -*- coding: utf-8 -*-\n+\"\"\"Create a singly linked list.\"\"\"\n+from __future__ import unicode_literals\n+\n+\n+class Node(object):\n+    \"\"\"Create a node to store data.\"\"\"\n+\n+    def __init__(self, value, pointer=None):\n+        \"\"\"Create an instance of a Node.\"\"\"\n+        self.value = value\n+        self.pointer = pointer\n+\n+\n+class LinkedList(object):\n+    \"\"\"Create a link list class to store strings of data.\"\"\"\n+\n+    def __init__(self, value_list=None):\n+        \"\"\"Create an instance of a singly-linked list.\"\"\"\n+        self.length = 0\n+        self.header = None\n+        if hasattr(value_list, '__iter__'):\n+            for value in value_list:\n+                self.push(value)\n+        elif value_list:\n+            self.push(value_list)\n+\n+    def __len__(self):\n+        \"\"\"Return the length of the linked list for the built in len.\"\"\"\n+        return self.length\n+\n+    def push(self, value):\n+        \"\"\"Add a new node to the head of the linked list.\"\"\"\n+        temp_node = self.header\n+        new_node = Node(value, temp_node)","path":"src/linked_list.py","position":35,"original_position":35,"commit_id":"63f500e74e04b2a6d9177dfb9a5811a04146b6bd","original_commit_id":"63f500e74e04b2a6d9177dfb9a5811a04146b6bd","user":{"login":"cewing","id":417109,"avatar_url":"https://avatars.githubusercontent.com/u/417109?v=3","gravatar_id":"","url":"https://api.github.com/users/cewing","html_url":"https://github.com/cewing","followers_url":"https://api.github.com/users/cewing/followers","following_url":"https://api.github.com/users/cewing/following{/other_user}","gists_url":"https://api.github.com/users/cewing/gists{/gist_id}","starred_url":"https://api.github.com/users/cewing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cewing/subscriptions","organizations_url":"https://api.github.com/users/cewing/orgs","repos_url":"https://api.github.com/users/cewing/repos","events_url":"https://api.github.com/users/cewing/events{/privacy}","received_events_url":"https://api.github.com/users/cewing/received_events","type":"User","site_admin":false},"body":"Any reason to use this `temp_node` variable?  I'd prefer you just pass in `self.head`.  ","created_at":"2016-08-19T00:00:27Z","updated_at":"2016-08-19T00:00:27Z","html_url":"https://github.com/jefferyrayrussell/data-structures/pull/1#discussion_r75410190","pull_request_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/jefferyrayrussell/data-structures/pulls/comments/75410190"},"html":{"href":"https://github.com/jefferyrayrussell/data-structures/pull/1#discussion_r75410190"},"pull_request":{"href":"https://api.github.com/repos/jefferyrayrussell/data-structures/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/jefferyrayrussell/data-structures/pulls/1","id":81716275,"html_url":"https://github.com/jefferyrayrussell/data-structures/pull/1","diff_url":"https://github.com/jefferyrayrussell/data-structures/pull/1.diff","patch_url":"https://github.com/jefferyrayrussell/data-structures/pull/1.patch","issue_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/issues/1","number":1,"state":"closed","locked":false,"title":"Link3","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},"body":"","created_at":"2016-08-17T21:03:34Z","updated_at":"2016-08-19T00:00:27Z","closed_at":"2016-08-17T21:08:10Z","merged_at":"2016-08-17T21:08:09Z","merge_commit_sha":"06ddca18a3e7370ee632bae7ebd1ab51959874f0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/pulls/1/commits","review_comments_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/pulls/1/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/1/comments","statuses_url":"https://api.github.com/repos/jefferyrayrussell/data-structures/statuses/63f500e74e04b2a6d9177dfb9a5811a04146b6bd","head":{"label":"jefferyrayrussell:link3","ref":"link3","sha":"63f500e74e04b2a6d9177dfb9a5811a04146b6bd","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-18T23:27:11Z","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":32,"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":"b6c40f3da1727789bed359c29f41c7451ac74d07","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-18T23:27:11Z","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":32,"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/1"},"html":{"href":"https://github.com/jefferyrayrussell/data-structures/pull/1"},"issue":{"href":"https://api.github.com/repos/jefferyrayrussell/data-structures/issues/1"},"comments":{"href":"https://api.github.com/repos/jefferyrayrussell/data-structures/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/jefferyrayrussell/data-structures/pulls/1/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/1/commits"},"statuses":{"href":"https://api.github.com/repos/jefferyrayrussell/data-structures/statuses/63f500e74e04b2a6d9177dfb9a5811a04146b6bd"}}}}
{"actor":{"display_login":"cewing"}}