{"action":"created","comment":{"url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/pulls/comments/72071189","id":72071189,"diff_hunk":"@@ -1,13 +1,49 @@\n-\"\"\"\n-Following code assumes a class named Widget that depends on\n-other widgets\n-Widget ctor takes a name, and function \n-add_dependency(depends)\n-marks widget as depends on all widgets in \"depends\" list\n-\n-When building a widget, you need to first build all the widgets it\n-depends on.\n-\n-Implement widget so the following code works\n-\"\"\"\n-\n+\"\"\"\r\n+      _      _      _\r\n+   __(.)< __(.)> __(.)=\r\n+   \\___)  \\___)  \\___)   \r\n+\r\n+Python course - Verint\r\n+Week 3\r\n+\r\n+\"\"\"\r\n+\r\n+class Widget(object):\r\n+\r\n+    def __init__(self, name):\r\n+        self.name = name\r\n+        self.depends = []\r\n+        self.complete = False\r\n+\r\n+    def add_dependency(self, *Widget):\r\n+        self.depends.extend(Widget)\r\n+\r\n+    def build(self):\r\n+        self.complete = True\r\n+        for dep in self.depends:\r\n+            if not dep.complete:\r","path":"20_classes_lab/03.py","position":37,"original_position":37,"commit_id":"792e0300b3d7deda8950223eec32ba2348fba4f5","original_commit_id":"792e0300b3d7deda8950223eec32ba2348fba4f5","user":{"login":"ynonp","id":128594,"avatar_url":"https://avatars.githubusercontent.com/u/128594?v=3","gravatar_id":"","url":"https://api.github.com/users/ynonp","html_url":"https://github.com/ynonp","followers_url":"https://api.github.com/users/ynonp/followers","following_url":"https://api.github.com/users/ynonp/following{/other_user}","gists_url":"https://api.github.com/users/ynonp/gists{/gist_id}","starred_url":"https://api.github.com/users/ynonp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ynonp/subscriptions","organizations_url":"https://api.github.com/users/ynonp/orgs","repos_url":"https://api.github.com/users/ynonp/repos","events_url":"https://api.github.com/users/ynonp/events{/privacy}","received_events_url":"https://api.github.com/users/ynonp/received_events","type":"User","site_admin":false},"body":"Fantastic! One style comment: It's usually nicer to `continue` on wrong input than to perform on the right ones. So prefer:\r\n\r\n```\r\nfor dep in self.depends:\r\n  if dep.complete: continue\r\n \r\n  dep.build()\r\n  print dep.name\r\n```","created_at":"2016-07-25T14:18:45Z","updated_at":"2016-07-25T14:18:45Z","html_url":"https://github.com/ynonp/python-examples-verint-2016-07/pull/199#discussion_r72071189","pull_request_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/pulls/199","_links":{"self":{"href":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/pulls/comments/72071189"},"html":{"href":"https://github.com/ynonp/python-examples-verint-2016-07/pull/199#discussion_r72071189"},"pull_request":{"href":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/pulls/199"}}},"pull_request":{"url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/pulls/199","id":78612021,"html_url":"https://github.com/ynonp/python-examples-verint-2016-07/pull/199","diff_url":"https://github.com/ynonp/python-examples-verint-2016-07/pull/199.diff","patch_url":"https://github.com/ynonp/python-examples-verint-2016-07/pull/199.patch","issue_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/issues/199","number":199,"state":"open","locked":false,"title":"ToCode Solution: תרגול תחביר מחלקות","user":{"login":"dovron","id":20268575,"avatar_url":"https://avatars.githubusercontent.com/u/20268575?v=3","gravatar_id":"","url":"https://api.github.com/users/dovron","html_url":"https://github.com/dovron","followers_url":"https://api.github.com/users/dovron/followers","following_url":"https://api.github.com/users/dovron/following{/other_user}","gists_url":"https://api.github.com/users/dovron/gists{/gist_id}","starred_url":"https://api.github.com/users/dovron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dovron/subscriptions","organizations_url":"https://api.github.com/users/dovron/orgs","repos_url":"https://api.github.com/users/dovron/repos","events_url":"https://api.github.com/users/dovron/events{/privacy}","received_events_url":"https://api.github.com/users/dovron/received_events","type":"User","site_admin":false},"body":null,"created_at":"2016-07-24T22:39:11Z","updated_at":"2016-07-25T14:18:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8f024bf21a3088321c699c74be35332eacbf0176","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/pulls/199/commits","review_comments_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/pulls/199/comments","review_comment_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/issues/199/comments","statuses_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/statuses/792e0300b3d7deda8950223eec32ba2348fba4f5","head":{"label":"dovron:sol-python-verint.class-syntax-lab","ref":"sol-python-verint.class-syntax-lab","sha":"792e0300b3d7deda8950223eec32ba2348fba4f5","user":{"login":"dovron","id":20268575,"avatar_url":"https://avatars.githubusercontent.com/u/20268575?v=3","gravatar_id":"","url":"https://api.github.com/users/dovron","html_url":"https://github.com/dovron","followers_url":"https://api.github.com/users/dovron/followers","following_url":"https://api.github.com/users/dovron/following{/other_user}","gists_url":"https://api.github.com/users/dovron/gists{/gist_id}","starred_url":"https://api.github.com/users/dovron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dovron/subscriptions","organizations_url":"https://api.github.com/users/dovron/orgs","repos_url":"https://api.github.com/users/dovron/repos","events_url":"https://api.github.com/users/dovron/events{/privacy}","received_events_url":"https://api.github.com/users/dovron/received_events","type":"User","site_admin":false},"repo":{"id":62503318,"name":"python-examples-verint-2016-07","full_name":"dovron/python-examples-verint-2016-07","owner":{"login":"dovron","id":20268575,"avatar_url":"https://avatars.githubusercontent.com/u/20268575?v=3","gravatar_id":"","url":"https://api.github.com/users/dovron","html_url":"https://github.com/dovron","followers_url":"https://api.github.com/users/dovron/followers","following_url":"https://api.github.com/users/dovron/following{/other_user}","gists_url":"https://api.github.com/users/dovron/gists{/gist_id}","starred_url":"https://api.github.com/users/dovron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dovron/subscriptions","organizations_url":"https://api.github.com/users/dovron/orgs","repos_url":"https://api.github.com/users/dovron/repos","events_url":"https://api.github.com/users/dovron/events{/privacy}","received_events_url":"https://api.github.com/users/dovron/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dovron/python-examples-verint-2016-07","description":"Python examples and exercises","fork":true,"url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07","forks_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/forks","keys_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/teams","hooks_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/hooks","issue_events_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/issues/events{/number}","events_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/events","assignees_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/assignees{/user}","branches_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/branches{/branch}","tags_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/tags","blobs_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/git/refs{/sha}","trees_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/statuses/{sha}","languages_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/languages","stargazers_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/stargazers","contributors_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/contributors","subscribers_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/subscribers","subscription_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/subscription","commits_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/commits{/sha}","git_commits_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/git/commits{/sha}","comments_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/comments{/number}","issue_comment_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/issues/comments{/number}","contents_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/contents/{+path}","compare_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/merges","archive_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/downloads","issues_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/issues{/number}","pulls_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/pulls{/number}","milestones_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/milestones{/number}","notifications_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/labels{/name}","releases_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/releases{/id}","deployments_url":"https://api.github.com/repos/dovron/python-examples-verint-2016-07/deployments","created_at":"2016-07-03T15:40:24Z","updated_at":"2016-07-03T15:40:26Z","pushed_at":"2016-07-24T22:39:11Z","git_url":"git://github.com/dovron/python-examples-verint-2016-07.git","ssh_url":"git@github.com:dovron/python-examples-verint-2016-07.git","clone_url":"https://github.com/dovron/python-examples-verint-2016-07.git","svn_url":"https://github.com/dovron/python-examples-verint-2016-07","homepage":null,"size":52,"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":"ynonp:master","ref":"master","sha":"100668f8b794303b42bbc343c9379979e34efbff","user":{"login":"ynonp","id":128594,"avatar_url":"https://avatars.githubusercontent.com/u/128594?v=3","gravatar_id":"","url":"https://api.github.com/users/ynonp","html_url":"https://github.com/ynonp","followers_url":"https://api.github.com/users/ynonp/followers","following_url":"https://api.github.com/users/ynonp/following{/other_user}","gists_url":"https://api.github.com/users/ynonp/gists{/gist_id}","starred_url":"https://api.github.com/users/ynonp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ynonp/subscriptions","organizations_url":"https://api.github.com/users/ynonp/orgs","repos_url":"https://api.github.com/users/ynonp/repos","events_url":"https://api.github.com/users/ynonp/events{/privacy}","received_events_url":"https://api.github.com/users/ynonp/received_events","type":"User","site_admin":false},"repo":{"id":62203857,"name":"python-examples-verint-2016-07","full_name":"ynonp/python-examples-verint-2016-07","owner":{"login":"ynonp","id":128594,"avatar_url":"https://avatars.githubusercontent.com/u/128594?v=3","gravatar_id":"","url":"https://api.github.com/users/ynonp","html_url":"https://github.com/ynonp","followers_url":"https://api.github.com/users/ynonp/followers","following_url":"https://api.github.com/users/ynonp/following{/other_user}","gists_url":"https://api.github.com/users/ynonp/gists{/gist_id}","starred_url":"https://api.github.com/users/ynonp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ynonp/subscriptions","organizations_url":"https://api.github.com/users/ynonp/orgs","repos_url":"https://api.github.com/users/ynonp/repos","events_url":"https://api.github.com/users/ynonp/events{/privacy}","received_events_url":"https://api.github.com/users/ynonp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ynonp/python-examples-verint-2016-07","description":"Python examples and exercises","fork":false,"url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07","forks_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/forks","keys_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/teams","hooks_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/hooks","issue_events_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/issues/events{/number}","events_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/events","assignees_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/assignees{/user}","branches_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/branches{/branch}","tags_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/tags","blobs_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/git/refs{/sha}","trees_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/statuses/{sha}","languages_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/languages","stargazers_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/stargazers","contributors_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/contributors","subscribers_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/subscribers","subscription_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/subscription","commits_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/commits{/sha}","git_commits_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/git/commits{/sha}","comments_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/comments{/number}","issue_comment_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/issues/comments{/number}","contents_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/contents/{+path}","compare_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/merges","archive_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/downloads","issues_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/issues{/number}","pulls_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/pulls{/number}","milestones_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/milestones{/number}","notifications_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/labels{/name}","releases_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/releases{/id}","deployments_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/deployments","created_at":"2016-06-29T07:06:57Z","updated_at":"2016-07-06T08:47:02Z","pushed_at":"2016-07-25T14:03:16Z","git_url":"git://github.com/ynonp/python-examples-verint-2016-07.git","ssh_url":"git@github.com:ynonp/python-examples-verint-2016-07.git","clone_url":"https://github.com/ynonp/python-examples-verint-2016-07.git","svn_url":"https://github.com/ynonp/python-examples-verint-2016-07","homepage":null,"size":539,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":33,"mirror_url":null,"open_issues_count":23,"forks":33,"open_issues":23,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/pulls/199"},"html":{"href":"https://github.com/ynonp/python-examples-verint-2016-07/pull/199"},"issue":{"href":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/issues/199"},"comments":{"href":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/issues/199/comments"},"review_comments":{"href":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/pulls/199/comments"},"review_comment":{"href":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/pulls/199/commits"},"statuses":{"href":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/statuses/792e0300b3d7deda8950223eec32ba2348fba4f5"}}}}
{"actor":{"display_login":"ynonp"}}