{"action":"created","comment":{"url":"https://api.github.com/repos/regenalgrant/datastructures/pulls/comments/98068588","pull_request_review_id":18695977,"id":98068588,"diff_hunk":"@@ -0,0 +1,90 @@\n+# -*- coding: utf-8 -*-\n+from __future__ import unicode_literals\n+\n+\n+class Node(object):\n+    \"\"\"Creating a template for a Node.\"\"\"\n+\n+    def __init__(self, data=None, next_node=None, previous=None):\n+        \"\"\"Providing attributes to Node.\"\"\"\n+        self.data = data\n+        self.next_node = next_node\n+        self.previous = previous\n+\n+\n+class DoublyLinkedList(object):\n+    \"\"\"Creating template for DoublyLinkedList.\"\"\"\n+\n+    def __init__(self, data=None):\n+        \"\"\"Providing a base-line for DoublyLinkedList.\"\"\"\n+        self.head = None\n+        self.tail = None\n+        try:\n+            if data:\n+                for i in data:\n+                    self.push(i)\n+        except TypeError:\n+            raise IndexError(\"Need to pass an iterable value\")\n+\n+    def push(self, data):\n+        \"\"\"Creating a push method that adds a new node to head of the DoublyLinkedList.\"\"\"\n+        new_node = Node(data)\n+        new_node.previous = None\n+        new_node.next_node = self.head\n+        if self.head:\n+            self.head.previous = new_node\n+        self.head = new_node\n+        if self.tail is None:\n+            self.tail = new_node\n+\n+    def pop(self):\n+        \"\"\"Creating a pop method from DoublyLinkedList.\"\"\"\n+        pop_head = self.head\n+        try:\n+            self.head.next_node.previous is None\n+            self.head = self.head.next_node\n+        except AttributeError:\n+            self.head is None\n+            self.tail is None\n+        return pop_head.data\n+\n+    def append(self, data):\n+        \"\"\"Appending the value at the tail of the list.\"\"\"\n+        new_node = Node(data)\n+        new_node.next_node = None\n+        new_node.previous = self.tail\n+        if self.tail:\n+            self.tail.next_node = new_node\n+        self.tail = new_node\n+        if self.head is None:\n+            self.head = new_node\n+\n+    def shift(self):\n+        \"\"\"Creating a shift method to remove from the tail and return it.\"\"\"\n+        shift_tail = self.tail\n+        try:\n+            self.tail = self.tail.previous\n+            self.tail.next_node is None\n+        except AttributeError:\n+            self.tail = None\n+            self.head = None\n+        return shift_tail\n+\n+    def remove(self, value):\n+        \"\"\"Create a 1st instance of a value remove from list starting with the head.\"\"\"\n+        pointer = self.head\n+        try:\n+            while pointer.data != value:\n+                pointer = pointer.next_node\n+        except AttributeError:\n+            raise IndexError(\"Value does not exist in the list\")\n+        if pointer.next_node is None and pointer.previous is None:\n+            self.head = None","path":"src/dll.py","position":82,"original_position":82,"commit_id":"18b84662bb608187b84eb2b74eba7aa731f702cc","original_commit_id":"18b84662bb608187b84eb2b74eba7aa731f702cc","user":{"login":"SeleniumK","id":14043382,"avatar_url":"https://avatars.githubusercontent.com/u/14043382?v=3","gravatar_id":"","url":"https://api.github.com/users/SeleniumK","html_url":"https://github.com/SeleniumK","followers_url":"https://api.github.com/users/SeleniumK/followers","following_url":"https://api.github.com/users/SeleniumK/following{/other_user}","gists_url":"https://api.github.com/users/SeleniumK/gists{/gist_id}","starred_url":"https://api.github.com/users/SeleniumK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SeleniumK/subscriptions","organizations_url":"https://api.github.com/users/SeleniumK/orgs","repos_url":"https://api.github.com/users/SeleniumK/repos","events_url":"https://api.github.com/users/SeleniumK/events{/privacy}","received_events_url":"https://api.github.com/users/SeleniumK/received_events","type":"User","site_admin":false},"body":"Great, but what about self.tail?","created_at":"2017-01-26T19:14:07Z","updated_at":"2017-01-26T19:18:51Z","html_url":"https://github.com/regenalgrant/datastructures/pull/3#discussion_r98068588","pull_request_url":"https://api.github.com/repos/regenalgrant/datastructures/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/regenalgrant/datastructures/pulls/comments/98068588"},"html":{"href":"https://github.com/regenalgrant/datastructures/pull/3#discussion_r98068588"},"pull_request":{"href":"https://api.github.com/repos/regenalgrant/datastructures/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/regenalgrant/datastructures/pulls/3","id":103234179,"html_url":"https://github.com/regenalgrant/datastructures/pull/3","diff_url":"https://github.com/regenalgrant/datastructures/pull/3.diff","patch_url":"https://github.com/regenalgrant/datastructures/pull/3.patch","issue_url":"https://api.github.com/repos/regenalgrant/datastructures/issues/3","number":3,"state":"open","locked":false,"title":"Dll","user":{"login":"regenalgrant","id":13881674,"avatar_url":"https://avatars.githubusercontent.com/u/13881674?v=3","gravatar_id":"","url":"https://api.github.com/users/regenalgrant","html_url":"https://github.com/regenalgrant","followers_url":"https://api.github.com/users/regenalgrant/followers","following_url":"https://api.github.com/users/regenalgrant/following{/other_user}","gists_url":"https://api.github.com/users/regenalgrant/gists{/gist_id}","starred_url":"https://api.github.com/users/regenalgrant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/regenalgrant/subscriptions","organizations_url":"https://api.github.com/users/regenalgrant/orgs","repos_url":"https://api.github.com/users/regenalgrant/repos","events_url":"https://api.github.com/users/regenalgrant/events{/privacy}","received_events_url":"https://api.github.com/users/regenalgrant/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-01-26T00:36:48Z","updated_at":"2017-01-26T19:18:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ac3551e0e69a77ce940e1681a708a0779c483f2c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/regenalgrant/datastructures/pulls/3/commits","review_comments_url":"https://api.github.com/repos/regenalgrant/datastructures/pulls/3/comments","review_comment_url":"https://api.github.com/repos/regenalgrant/datastructures/pulls/comments{/number}","comments_url":"https://api.github.com/repos/regenalgrant/datastructures/issues/3/comments","statuses_url":"https://api.github.com/repos/regenalgrant/datastructures/statuses/18b84662bb608187b84eb2b74eba7aa731f702cc","head":{"label":"regenalgrant:dll","ref":"dll","sha":"18b84662bb608187b84eb2b74eba7aa731f702cc","user":{"login":"regenalgrant","id":13881674,"avatar_url":"https://avatars.githubusercontent.com/u/13881674?v=3","gravatar_id":"","url":"https://api.github.com/users/regenalgrant","html_url":"https://github.com/regenalgrant","followers_url":"https://api.github.com/users/regenalgrant/followers","following_url":"https://api.github.com/users/regenalgrant/following{/other_user}","gists_url":"https://api.github.com/users/regenalgrant/gists{/gist_id}","starred_url":"https://api.github.com/users/regenalgrant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/regenalgrant/subscriptions","organizations_url":"https://api.github.com/users/regenalgrant/orgs","repos_url":"https://api.github.com/users/regenalgrant/repos","events_url":"https://api.github.com/users/regenalgrant/events{/privacy}","received_events_url":"https://api.github.com/users/regenalgrant/received_events","type":"User","site_admin":false},"repo":{"id":78151301,"name":"datastructures","full_name":"regenalgrant/datastructures","owner":{"login":"regenalgrant","id":13881674,"avatar_url":"https://avatars.githubusercontent.com/u/13881674?v=3","gravatar_id":"","url":"https://api.github.com/users/regenalgrant","html_url":"https://github.com/regenalgrant","followers_url":"https://api.github.com/users/regenalgrant/followers","following_url":"https://api.github.com/users/regenalgrant/following{/other_user}","gists_url":"https://api.github.com/users/regenalgrant/gists{/gist_id}","starred_url":"https://api.github.com/users/regenalgrant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/regenalgrant/subscriptions","organizations_url":"https://api.github.com/users/regenalgrant/orgs","repos_url":"https://api.github.com/users/regenalgrant/repos","events_url":"https://api.github.com/users/regenalgrant/events{/privacy}","received_events_url":"https://api.github.com/users/regenalgrant/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/regenalgrant/datastructures","description":"TutorBased","fork":false,"url":"https://api.github.com/repos/regenalgrant/datastructures","forks_url":"https://api.github.com/repos/regenalgrant/datastructures/forks","keys_url":"https://api.github.com/repos/regenalgrant/datastructures/keys{/key_id}","collaborators_url":"https://api.github.com/repos/regenalgrant/datastructures/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/regenalgrant/datastructures/teams","hooks_url":"https://api.github.com/repos/regenalgrant/datastructures/hooks","issue_events_url":"https://api.github.com/repos/regenalgrant/datastructures/issues/events{/number}","events_url":"https://api.github.com/repos/regenalgrant/datastructures/events","assignees_url":"https://api.github.com/repos/regenalgrant/datastructures/assignees{/user}","branches_url":"https://api.github.com/repos/regenalgrant/datastructures/branches{/branch}","tags_url":"https://api.github.com/repos/regenalgrant/datastructures/tags","blobs_url":"https://api.github.com/repos/regenalgrant/datastructures/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/regenalgrant/datastructures/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/regenalgrant/datastructures/git/refs{/sha}","trees_url":"https://api.github.com/repos/regenalgrant/datastructures/git/trees{/sha}","statuses_url":"https://api.github.com/repos/regenalgrant/datastructures/statuses/{sha}","languages_url":"https://api.github.com/repos/regenalgrant/datastructures/languages","stargazers_url":"https://api.github.com/repos/regenalgrant/datastructures/stargazers","contributors_url":"https://api.github.com/repos/regenalgrant/datastructures/contributors","subscribers_url":"https://api.github.com/repos/regenalgrant/datastructures/subscribers","subscription_url":"https://api.github.com/repos/regenalgrant/datastructures/subscription","commits_url":"https://api.github.com/repos/regenalgrant/datastructures/commits{/sha}","git_commits_url":"https://api.github.com/repos/regenalgrant/datastructures/git/commits{/sha}","comments_url":"https://api.github.com/repos/regenalgrant/datastructures/comments{/number}","issue_comment_url":"https://api.github.com/repos/regenalgrant/datastructures/issues/comments{/number}","contents_url":"https://api.github.com/repos/regenalgrant/datastructures/contents/{+path}","compare_url":"https://api.github.com/repos/regenalgrant/datastructures/compare/{base}...{head}","merges_url":"https://api.github.com/repos/regenalgrant/datastructures/merges","archive_url":"https://api.github.com/repos/regenalgrant/datastructures/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/regenalgrant/datastructures/downloads","issues_url":"https://api.github.com/repos/regenalgrant/datastructures/issues{/number}","pulls_url":"https://api.github.com/repos/regenalgrant/datastructures/pulls{/number}","milestones_url":"https://api.github.com/repos/regenalgrant/datastructures/milestones{/number}","notifications_url":"https://api.github.com/repos/regenalgrant/datastructures/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/regenalgrant/datastructures/labels{/name}","releases_url":"https://api.github.com/repos/regenalgrant/datastructures/releases{/id}","deployments_url":"https://api.github.com/repos/regenalgrant/datastructures/deployments","created_at":"2017-01-05T21:52:51Z","updated_at":"2017-01-05T21:52:51Z","pushed_at":"2017-01-26T00:36:48Z","git_url":"git://github.com/regenalgrant/datastructures.git","ssh_url":"git@github.com:regenalgrant/datastructures.git","clone_url":"https://github.com/regenalgrant/datastructures.git","svn_url":"https://github.com/regenalgrant/datastructures","homepage":null,"size":41,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"regenalgrant:master","ref":"master","sha":"02e6acbc1c73a6acd8eea127e23b20f230b7d2fe","user":{"login":"regenalgrant","id":13881674,"avatar_url":"https://avatars.githubusercontent.com/u/13881674?v=3","gravatar_id":"","url":"https://api.github.com/users/regenalgrant","html_url":"https://github.com/regenalgrant","followers_url":"https://api.github.com/users/regenalgrant/followers","following_url":"https://api.github.com/users/regenalgrant/following{/other_user}","gists_url":"https://api.github.com/users/regenalgrant/gists{/gist_id}","starred_url":"https://api.github.com/users/regenalgrant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/regenalgrant/subscriptions","organizations_url":"https://api.github.com/users/regenalgrant/orgs","repos_url":"https://api.github.com/users/regenalgrant/repos","events_url":"https://api.github.com/users/regenalgrant/events{/privacy}","received_events_url":"https://api.github.com/users/regenalgrant/received_events","type":"User","site_admin":false},"repo":{"id":78151301,"name":"datastructures","full_name":"regenalgrant/datastructures","owner":{"login":"regenalgrant","id":13881674,"avatar_url":"https://avatars.githubusercontent.com/u/13881674?v=3","gravatar_id":"","url":"https://api.github.com/users/regenalgrant","html_url":"https://github.com/regenalgrant","followers_url":"https://api.github.com/users/regenalgrant/followers","following_url":"https://api.github.com/users/regenalgrant/following{/other_user}","gists_url":"https://api.github.com/users/regenalgrant/gists{/gist_id}","starred_url":"https://api.github.com/users/regenalgrant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/regenalgrant/subscriptions","organizations_url":"https://api.github.com/users/regenalgrant/orgs","repos_url":"https://api.github.com/users/regenalgrant/repos","events_url":"https://api.github.com/users/regenalgrant/events{/privacy}","received_events_url":"https://api.github.com/users/regenalgrant/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/regenalgrant/datastructures","description":"TutorBased","fork":false,"url":"https://api.github.com/repos/regenalgrant/datastructures","forks_url":"https://api.github.com/repos/regenalgrant/datastructures/forks","keys_url":"https://api.github.com/repos/regenalgrant/datastructures/keys{/key_id}","collaborators_url":"https://api.github.com/repos/regenalgrant/datastructures/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/regenalgrant/datastructures/teams","hooks_url":"https://api.github.com/repos/regenalgrant/datastructures/hooks","issue_events_url":"https://api.github.com/repos/regenalgrant/datastructures/issues/events{/number}","events_url":"https://api.github.com/repos/regenalgrant/datastructures/events","assignees_url":"https://api.github.com/repos/regenalgrant/datastructures/assignees{/user}","branches_url":"https://api.github.com/repos/regenalgrant/datastructures/branches{/branch}","tags_url":"https://api.github.com/repos/regenalgrant/datastructures/tags","blobs_url":"https://api.github.com/repos/regenalgrant/datastructures/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/regenalgrant/datastructures/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/regenalgrant/datastructures/git/refs{/sha}","trees_url":"https://api.github.com/repos/regenalgrant/datastructures/git/trees{/sha}","statuses_url":"https://api.github.com/repos/regenalgrant/datastructures/statuses/{sha}","languages_url":"https://api.github.com/repos/regenalgrant/datastructures/languages","stargazers_url":"https://api.github.com/repos/regenalgrant/datastructures/stargazers","contributors_url":"https://api.github.com/repos/regenalgrant/datastructures/contributors","subscribers_url":"https://api.github.com/repos/regenalgrant/datastructures/subscribers","subscription_url":"https://api.github.com/repos/regenalgrant/datastructures/subscription","commits_url":"https://api.github.com/repos/regenalgrant/datastructures/commits{/sha}","git_commits_url":"https://api.github.com/repos/regenalgrant/datastructures/git/commits{/sha}","comments_url":"https://api.github.com/repos/regenalgrant/datastructures/comments{/number}","issue_comment_url":"https://api.github.com/repos/regenalgrant/datastructures/issues/comments{/number}","contents_url":"https://api.github.com/repos/regenalgrant/datastructures/contents/{+path}","compare_url":"https://api.github.com/repos/regenalgrant/datastructures/compare/{base}...{head}","merges_url":"https://api.github.com/repos/regenalgrant/datastructures/merges","archive_url":"https://api.github.com/repos/regenalgrant/datastructures/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/regenalgrant/datastructures/downloads","issues_url":"https://api.github.com/repos/regenalgrant/datastructures/issues{/number}","pulls_url":"https://api.github.com/repos/regenalgrant/datastructures/pulls{/number}","milestones_url":"https://api.github.com/repos/regenalgrant/datastructures/milestones{/number}","notifications_url":"https://api.github.com/repos/regenalgrant/datastructures/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/regenalgrant/datastructures/labels{/name}","releases_url":"https://api.github.com/repos/regenalgrant/datastructures/releases{/id}","deployments_url":"https://api.github.com/repos/regenalgrant/datastructures/deployments","created_at":"2017-01-05T21:52:51Z","updated_at":"2017-01-05T21:52:51Z","pushed_at":"2017-01-26T00:36:48Z","git_url":"git://github.com/regenalgrant/datastructures.git","ssh_url":"git@github.com:regenalgrant/datastructures.git","clone_url":"https://github.com/regenalgrant/datastructures.git","svn_url":"https://github.com/regenalgrant/datastructures","homepage":null,"size":41,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/regenalgrant/datastructures/pulls/3"},"html":{"href":"https://github.com/regenalgrant/datastructures/pull/3"},"issue":{"href":"https://api.github.com/repos/regenalgrant/datastructures/issues/3"},"comments":{"href":"https://api.github.com/repos/regenalgrant/datastructures/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/regenalgrant/datastructures/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/regenalgrant/datastructures/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/regenalgrant/datastructures/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/regenalgrant/datastructures/statuses/18b84662bb608187b84eb2b74eba7aa731f702cc"}}}}
{"actor":{"display_login":"SeleniumK"}}