{"action":"created","comment":{"url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/pulls/comments/70923944","id":70923944,"diff_hunk":"@@ -4,4 +4,20 @@\n     mymul - returns the multiplication of its input arguments\n     Ignore non-numeric arguments\n \"\"\"\n+import operator\r\n \n+def perform(action, *nums):\n+    return reduce(action, [x for x in list(nums[0]) if isinstance(x, int)])\n+\n+def mysum(*nums):\n+    return perform(operator.add, nums)\n+\n+def mymul(*nums):\n+    # add 1 just in case list is empty\n+    newNums = list(nums)\n+    newNums.append(1)\n+    return perform(operator.mul, newNums)","path":"14_functions_lab/01.py","position":16,"original_position":16,"commit_id":"d11a4c9697c4fb18525a7a2cbe6946abf5ddc765","original_commit_id":"d11a4c9697c4fb18525a7a2cbe6946abf5ddc765","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":"Or even better: `return perform(operator.mul, nums + [1])`","created_at":"2016-07-15T05:38:35Z","updated_at":"2016-07-15T05:38:35Z","html_url":"https://github.com/ynonp/python-examples-verint-2016-07/pull/129#discussion_r70923944","pull_request_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/pulls/129","_links":{"self":{"href":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/pulls/comments/70923944"},"html":{"href":"https://github.com/ynonp/python-examples-verint-2016-07/pull/129#discussion_r70923944"},"pull_request":{"href":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/pulls/129"}}},"pull_request":{"url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/pulls/129","id":77440134,"html_url":"https://github.com/ynonp/python-examples-verint-2016-07/pull/129","diff_url":"https://github.com/ynonp/python-examples-verint-2016-07/pull/129.diff","patch_url":"https://github.com/ynonp/python-examples-verint-2016-07/pull/129.patch","issue_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/issues/129","number":129,"state":"open","locked":false,"title":"ToCode Solution: תרגול פונקציות","user":{"login":"konst1988","id":4901615,"avatar_url":"https://avatars.githubusercontent.com/u/4901615?v=3","gravatar_id":"","url":"https://api.github.com/users/konst1988","html_url":"https://github.com/konst1988","followers_url":"https://api.github.com/users/konst1988/followers","following_url":"https://api.github.com/users/konst1988/following{/other_user}","gists_url":"https://api.github.com/users/konst1988/gists{/gist_id}","starred_url":"https://api.github.com/users/konst1988/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/konst1988/subscriptions","organizations_url":"https://api.github.com/users/konst1988/orgs","repos_url":"https://api.github.com/users/konst1988/repos","events_url":"https://api.github.com/users/konst1988/events{/privacy}","received_events_url":"https://api.github.com/users/konst1988/received_events","type":"User","site_admin":false},"body":null,"created_at":"2016-07-14T11:23:56Z","updated_at":"2016-07-15T05:38:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2f81511bd16ea4861b1d8f18e6ac51d5a84e766b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/pulls/129/commits","review_comments_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/pulls/129/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/129/comments","statuses_url":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/statuses/d11a4c9697c4fb18525a7a2cbe6946abf5ddc765","head":{"label":"konst1988:sol-python-verint.functions-lab","ref":"sol-python-verint.functions-lab","sha":"d11a4c9697c4fb18525a7a2cbe6946abf5ddc765","user":{"login":"konst1988","id":4901615,"avatar_url":"https://avatars.githubusercontent.com/u/4901615?v=3","gravatar_id":"","url":"https://api.github.com/users/konst1988","html_url":"https://github.com/konst1988","followers_url":"https://api.github.com/users/konst1988/followers","following_url":"https://api.github.com/users/konst1988/following{/other_user}","gists_url":"https://api.github.com/users/konst1988/gists{/gist_id}","starred_url":"https://api.github.com/users/konst1988/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/konst1988/subscriptions","organizations_url":"https://api.github.com/users/konst1988/orgs","repos_url":"https://api.github.com/users/konst1988/repos","events_url":"https://api.github.com/users/konst1988/events{/privacy}","received_events_url":"https://api.github.com/users/konst1988/received_events","type":"User","site_admin":false},"repo":{"id":62500634,"name":"python-examples-verint-2016-07","full_name":"konst1988/python-examples-verint-2016-07","owner":{"login":"konst1988","id":4901615,"avatar_url":"https://avatars.githubusercontent.com/u/4901615?v=3","gravatar_id":"","url":"https://api.github.com/users/konst1988","html_url":"https://github.com/konst1988","followers_url":"https://api.github.com/users/konst1988/followers","following_url":"https://api.github.com/users/konst1988/following{/other_user}","gists_url":"https://api.github.com/users/konst1988/gists{/gist_id}","starred_url":"https://api.github.com/users/konst1988/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/konst1988/subscriptions","organizations_url":"https://api.github.com/users/konst1988/orgs","repos_url":"https://api.github.com/users/konst1988/repos","events_url":"https://api.github.com/users/konst1988/events{/privacy}","received_events_url":"https://api.github.com/users/konst1988/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/konst1988/python-examples-verint-2016-07","description":"Python examples and exercises","fork":true,"url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07","forks_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/forks","keys_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/keys{/key_id}","collaborators_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/teams","hooks_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/hooks","issue_events_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/issues/events{/number}","events_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/events","assignees_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/assignees{/user}","branches_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/branches{/branch}","tags_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/tags","blobs_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/git/refs{/sha}","trees_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/git/trees{/sha}","statuses_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/statuses/{sha}","languages_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/languages","stargazers_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/stargazers","contributors_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/contributors","subscribers_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/subscribers","subscription_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/subscription","commits_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/commits{/sha}","git_commits_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/git/commits{/sha}","comments_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/comments{/number}","issue_comment_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/issues/comments{/number}","contents_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/contents/{+path}","compare_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/compare/{base}...{head}","merges_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/merges","archive_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/downloads","issues_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/issues{/number}","pulls_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/pulls{/number}","milestones_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/milestones{/number}","notifications_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/labels{/name}","releases_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/releases{/id}","deployments_url":"https://api.github.com/repos/konst1988/python-examples-verint-2016-07/deployments","created_at":"2016-07-03T14:38:51Z","updated_at":"2016-07-03T14:38:52Z","pushed_at":"2016-07-14T12:21:32Z","git_url":"git://github.com/konst1988/python-examples-verint-2016-07.git","ssh_url":"git@github.com:konst1988/python-examples-verint-2016-07.git","clone_url":"https://github.com/konst1988/python-examples-verint-2016-07.git","svn_url":"https://github.com/konst1988/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":"7ecd83de5ed593f7627338fa885021af9d73028e","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-14T22:07:25Z","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":401,"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":22,"forks":33,"open_issues":22,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/pulls/129"},"html":{"href":"https://github.com/ynonp/python-examples-verint-2016-07/pull/129"},"issue":{"href":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/issues/129"},"comments":{"href":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/issues/129/comments"},"review_comments":{"href":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/pulls/129/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/129/commits"},"statuses":{"href":"https://api.github.com/repos/ynonp/python-examples-verint-2016-07/statuses/d11a4c9697c4fb18525a7a2cbe6946abf5ddc765"}}}}
{"actor":{"display_login":"ynonp"}}