{"action":"created","comment":{"url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/pulls/comments/71767444","id":71767444,"diff_hunk":"@@ -1,40 +1,91 @@\n from .interface import AbstractLinkedList\n-\n+from .node import Node\n+from functools import reduce\n \n class LinkedList(AbstractLinkedList):\n     \"\"\"\n     Implementation of an AbstractLinkedList inteface.\n     \"\"\"\n \n-    def __init__(self, elements=None):\n-        pass\n+    def __init__(self, elements=[]):\n+        #self.elements = elements\n+        self.start = None\n+        self.end = None\n+        for elem in elements:\n+            self.append(elem)\n \n     def __str__(self):\n-        pass\n+        return_string = \"[\"\n+        for node in self:\n+            return_string += str(node)\n+            if not node is self.end:\n+                return_string += \", \"\n+        return_string += \"]\"\n+        return return_string\n \n     def __len__(self):\n-        pass\n-\n+        return reduce(lambda x,y: x+1, [node for node in self], 0)\n+                \n     def __iter__(self):","path":"linked_list/implementation.py","position":35,"original_position":35,"commit_id":"8d229b3da55d1701c943fd8363158b176a1906df","original_commit_id":"8d229b3da55d1701c943fd8363158b176a1906df","user":{"login":"siplis-nicolas","id":20445822,"avatar_url":"https://avatars.githubusercontent.com/u/20445822?v=3","gravatar_id":"","url":"https://api.github.com/users/siplis-nicolas","html_url":"https://github.com/siplis-nicolas","followers_url":"https://api.github.com/users/siplis-nicolas/followers","following_url":"https://api.github.com/users/siplis-nicolas/following{/other_user}","gists_url":"https://api.github.com/users/siplis-nicolas/gists{/gist_id}","starred_url":"https://api.github.com/users/siplis-nicolas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/siplis-nicolas/subscriptions","organizations_url":"https://api.github.com/users/siplis-nicolas/orgs","repos_url":"https://api.github.com/users/siplis-nicolas/repos","events_url":"https://api.github.com/users/siplis-nicolas/events{/privacy}","received_events_url":"https://api.github.com/users/siplis-nicolas/received_events","type":"User","site_admin":false},"body":"Great use of generators! It saves you from implementing the next() method and lets you avoid declaring an extra class attribute to keep track of which element you're on.","created_at":"2016-07-21T19:06:04Z","updated_at":"2016-07-21T19:06:04Z","html_url":"https://github.com/rmotr-group-projects/pyp-w2-gw-linked-list/pull/20#discussion_r71767444","pull_request_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/pulls/20","_links":{"self":{"href":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/pulls/comments/71767444"},"html":{"href":"https://github.com/rmotr-group-projects/pyp-w2-gw-linked-list/pull/20#discussion_r71767444"},"pull_request":{"href":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/pulls/20","id":78075519,"html_url":"https://github.com/rmotr-group-projects/pyp-w2-gw-linked-list/pull/20","diff_url":"https://github.com/rmotr-group-projects/pyp-w2-gw-linked-list/pull/20.diff","patch_url":"https://github.com/rmotr-group-projects/pyp-w2-gw-linked-list/pull/20.patch","issue_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/issues/20","number":20,"state":"open","locked":false,"title":"Group 2 working solution to linked-list","user":{"login":"demetrios-koziris","id":8272403,"avatar_url":"https://avatars.githubusercontent.com/u/8272403?v=3","gravatar_id":"","url":"https://api.github.com/users/demetrios-koziris","html_url":"https://github.com/demetrios-koziris","followers_url":"https://api.github.com/users/demetrios-koziris/followers","following_url":"https://api.github.com/users/demetrios-koziris/following{/other_user}","gists_url":"https://api.github.com/users/demetrios-koziris/gists{/gist_id}","starred_url":"https://api.github.com/users/demetrios-koziris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demetrios-koziris/subscriptions","organizations_url":"https://api.github.com/users/demetrios-koziris/orgs","repos_url":"https://api.github.com/users/demetrios-koziris/repos","events_url":"https://api.github.com/users/demetrios-koziris/events{/privacy}","received_events_url":"https://api.github.com/users/demetrios-koziris/received_events","type":"User","site_admin":false},"body":"**Group 2 Team members**\r\n\r\n* Demetrios Koziris\r\n* Will Hieronymus\r\n* Nick Van Kuren","created_at":"2016-07-20T01:30:11Z","updated_at":"2016-07-21T19:06:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d745d7f20bf752c3a826fd5d3c401c7e9cb028fb","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/pulls/20/commits","review_comments_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/pulls/20/comments","review_comment_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/issues/20/comments","statuses_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/statuses/8d229b3da55d1701c943fd8363158b176a1906df","head":{"label":"demetrios-koziris:master","ref":"master","sha":"8d229b3da55d1701c943fd8363158b176a1906df","user":{"login":"demetrios-koziris","id":8272403,"avatar_url":"https://avatars.githubusercontent.com/u/8272403?v=3","gravatar_id":"","url":"https://api.github.com/users/demetrios-koziris","html_url":"https://github.com/demetrios-koziris","followers_url":"https://api.github.com/users/demetrios-koziris/followers","following_url":"https://api.github.com/users/demetrios-koziris/following{/other_user}","gists_url":"https://api.github.com/users/demetrios-koziris/gists{/gist_id}","starred_url":"https://api.github.com/users/demetrios-koziris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demetrios-koziris/subscriptions","organizations_url":"https://api.github.com/users/demetrios-koziris/orgs","repos_url":"https://api.github.com/users/demetrios-koziris/repos","events_url":"https://api.github.com/users/demetrios-koziris/events{/privacy}","received_events_url":"https://api.github.com/users/demetrios-koziris/received_events","type":"User","site_admin":false},"repo":{"id":63731883,"name":"pyp-w2-gw-linked-list","full_name":"demetrios-koziris/pyp-w2-gw-linked-list","owner":{"login":"demetrios-koziris","id":8272403,"avatar_url":"https://avatars.githubusercontent.com/u/8272403?v=3","gravatar_id":"","url":"https://api.github.com/users/demetrios-koziris","html_url":"https://github.com/demetrios-koziris","followers_url":"https://api.github.com/users/demetrios-koziris/followers","following_url":"https://api.github.com/users/demetrios-koziris/following{/other_user}","gists_url":"https://api.github.com/users/demetrios-koziris/gists{/gist_id}","starred_url":"https://api.github.com/users/demetrios-koziris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demetrios-koziris/subscriptions","organizations_url":"https://api.github.com/users/demetrios-koziris/orgs","repos_url":"https://api.github.com/users/demetrios-koziris/repos","events_url":"https://api.github.com/users/demetrios-koziris/events{/privacy}","received_events_url":"https://api.github.com/users/demetrios-koziris/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/demetrios-koziris/pyp-w2-gw-linked-list","description":"Group Project - Linked list","fork":true,"url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list","forks_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/forks","keys_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/keys{/key_id}","collaborators_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/teams","hooks_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/hooks","issue_events_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/issues/events{/number}","events_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/events","assignees_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/assignees{/user}","branches_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/branches{/branch}","tags_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/tags","blobs_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/git/refs{/sha}","trees_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/git/trees{/sha}","statuses_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/statuses/{sha}","languages_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/languages","stargazers_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/stargazers","contributors_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/contributors","subscribers_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/subscribers","subscription_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/subscription","commits_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/commits{/sha}","git_commits_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/git/commits{/sha}","comments_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/comments{/number}","issue_comment_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/issues/comments{/number}","contents_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/contents/{+path}","compare_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/compare/{base}...{head}","merges_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/merges","archive_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/downloads","issues_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/issues{/number}","pulls_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/pulls{/number}","milestones_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/milestones{/number}","notifications_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/labels{/name}","releases_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/releases{/id}","deployments_url":"https://api.github.com/repos/demetrios-koziris/pyp-w2-gw-linked-list/deployments","created_at":"2016-07-19T22:22:45Z","updated_at":"2016-07-19T22:22:46Z","pushed_at":"2016-07-20T21:49:46Z","git_url":"git://github.com/demetrios-koziris/pyp-w2-gw-linked-list.git","ssh_url":"git@github.com:demetrios-koziris/pyp-w2-gw-linked-list.git","clone_url":"https://github.com/demetrios-koziris/pyp-w2-gw-linked-list.git","svn_url":"https://github.com/demetrios-koziris/pyp-w2-gw-linked-list","homepage":null,"size":20,"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":"rmotr-group-projects:master","ref":"master","sha":"d31ce774ce0160b1e13bce84667a064fade77ae5","user":{"login":"rmotr-group-projects","id":18366789,"avatar_url":"https://avatars.githubusercontent.com/u/18366789?v=3","gravatar_id":"","url":"https://api.github.com/users/rmotr-group-projects","html_url":"https://github.com/rmotr-group-projects","followers_url":"https://api.github.com/users/rmotr-group-projects/followers","following_url":"https://api.github.com/users/rmotr-group-projects/following{/other_user}","gists_url":"https://api.github.com/users/rmotr-group-projects/gists{/gist_id}","starred_url":"https://api.github.com/users/rmotr-group-projects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmotr-group-projects/subscriptions","organizations_url":"https://api.github.com/users/rmotr-group-projects/orgs","repos_url":"https://api.github.com/users/rmotr-group-projects/repos","events_url":"https://api.github.com/users/rmotr-group-projects/events{/privacy}","received_events_url":"https://api.github.com/users/rmotr-group-projects/received_events","type":"Organization","site_admin":false},"repo":{"id":59420019,"name":"pyp-w2-gw-linked-list","full_name":"rmotr-group-projects/pyp-w2-gw-linked-list","owner":{"login":"rmotr-group-projects","id":18366789,"avatar_url":"https://avatars.githubusercontent.com/u/18366789?v=3","gravatar_id":"","url":"https://api.github.com/users/rmotr-group-projects","html_url":"https://github.com/rmotr-group-projects","followers_url":"https://api.github.com/users/rmotr-group-projects/followers","following_url":"https://api.github.com/users/rmotr-group-projects/following{/other_user}","gists_url":"https://api.github.com/users/rmotr-group-projects/gists{/gist_id}","starred_url":"https://api.github.com/users/rmotr-group-projects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmotr-group-projects/subscriptions","organizations_url":"https://api.github.com/users/rmotr-group-projects/orgs","repos_url":"https://api.github.com/users/rmotr-group-projects/repos","events_url":"https://api.github.com/users/rmotr-group-projects/events{/privacy}","received_events_url":"https://api.github.com/users/rmotr-group-projects/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rmotr-group-projects/pyp-w2-gw-linked-list","description":"Group Project - Linked list","fork":false,"url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list","forks_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/forks","keys_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/teams","hooks_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/hooks","issue_events_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/issues/events{/number}","events_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/events","assignees_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/assignees{/user}","branches_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/branches{/branch}","tags_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/tags","blobs_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/git/refs{/sha}","trees_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/statuses/{sha}","languages_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/languages","stargazers_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/stargazers","contributors_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/contributors","subscribers_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/subscribers","subscription_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/subscription","commits_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/commits{/sha}","git_commits_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/git/commits{/sha}","comments_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/comments{/number}","issue_comment_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/issues/comments{/number}","contents_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/contents/{+path}","compare_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/merges","archive_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/downloads","issues_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/issues{/number}","pulls_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/pulls{/number}","milestones_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/milestones{/number}","notifications_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/labels{/name}","releases_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/releases{/id}","deployments_url":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/deployments","created_at":"2016-05-22T15:38:34Z","updated_at":"2016-07-20T15:57:41Z","pushed_at":"2016-07-21T01:17:31Z","git_url":"git://github.com/rmotr-group-projects/pyp-w2-gw-linked-list.git","ssh_url":"git@github.com:rmotr-group-projects/pyp-w2-gw-linked-list.git","clone_url":"https://github.com/rmotr-group-projects/pyp-w2-gw-linked-list.git","svn_url":"https://github.com/rmotr-group-projects/pyp-w2-gw-linked-list","homepage":null,"size":80,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":44,"mirror_url":null,"open_issues_count":7,"forks":44,"open_issues":7,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/pulls/20"},"html":{"href":"https://github.com/rmotr-group-projects/pyp-w2-gw-linked-list/pull/20"},"issue":{"href":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/issues/20"},"comments":{"href":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/rmotr-group-projects/pyp-w2-gw-linked-list/statuses/8d229b3da55d1701c943fd8363158b176a1906df"}}}}
{"actor":{"display_login":"siplis-nicolas"}}