{"action":"created","comment":{"url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/pulls/comments/234433342","pull_request_review_id":176078044,"id":234433342,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNDQzMzM0Mg==","diff_hunk":"@@ -0,0 +1,54 @@\n+#!/usr/bin/python\n+\n+\"\"\"\n+An exercise in playing with Exceptions.\n+Make lots of try/except blocks for fun and profit.\n+\n+Make sure to catch specifically the error you find, rather than all errors.\n+\"\"\"\n+\n+from except_test import fun, more_fun, last_fun\n+\n+\n+# Figure out what the exception is, catch it and while still\n+# in that catch block, try again with the second item in the list\n+first_try = ['spam', 'cheese', 'mr death']\n+try:\n+    joke = fun(first_try[0])\n+except NameError:\n+    joke = fun(first_try[1])\n+    \n+\n+# Here is a try/except block. Add an else that prints not_joke\n+try:\n+    not_joke = fun(first_try[2])\n+except SyntaxError:\n+    print('Run Away!')\n+else:\n+    print(not_joke)\n+    \n+\n+# What did that do? You can think of else in this context, as well as in\n+# loops as meaning: \"else if nothing went wrong\"\n+# (no breaks in  loops, no exceptions in try blocks)\n+\n+# Figure out what the exception is, catch it and in that same block\n+#\n+# try calling the more_fun function with the 2nd language in the list,\n+# again assigning it to more_joke.\n+#\n+# If there are no exceptions, call the more_fun function with the last\n+# language in the list\n+\n+# Finally, while still in the try/except block and regardless of whether\n+# there were any exceptions, call the function last_fun with no\n+# parameters. (pun intended)\n+\n+langs = ['java', 'c', 'python']\n+try:\n+    more_joke = more_fun(langs[0])\n+except IndexError:\n+    more_joke=more_fun(langs[1])\n+finally:    \n+    last_fun()\n+    ","path":"students/BrianNisonger/session5/except_exercise.py","position":54,"original_position":54,"commit_id":"a158a3eadce249d4ed7c6cf508d1abd6b4e4a2d4","original_commit_id":"a158a3eadce249d4ed7c6cf508d1abd6b4e4a2d4","user":{"login":"PythonCHB","id":1840917,"node_id":"MDQ6VXNlcjE4NDA5MTc=","avatar_url":"https://avatars1.githubusercontent.com/u/1840917?v=4","gravatar_id":"","url":"https://api.github.com/users/PythonCHB","html_url":"https://github.com/PythonCHB","followers_url":"https://api.github.com/users/PythonCHB/followers","following_url":"https://api.github.com/users/PythonCHB/following{/other_user}","gists_url":"https://api.github.com/users/PythonCHB/gists{/gist_id}","starred_url":"https://api.github.com/users/PythonCHB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PythonCHB/subscriptions","organizations_url":"https://api.github.com/users/PythonCHB/orgs","repos_url":"https://api.github.com/users/PythonCHB/repos","events_url":"https://api.github.com/users/PythonCHB/events{/privacy}","received_events_url":"https://api.github.com/users/PythonCHB/received_events","type":"User","site_admin":false},"body":"perfect!\r\n","created_at":"2018-11-18T08:27:25Z","updated_at":"2018-11-18T08:30:29Z","html_url":"https://github.com/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/pull/148#discussion_r234433342","pull_request_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/pulls/148","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/pulls/comments/234433342"},"html":{"href":"https://github.com/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/pull/148#discussion_r234433342"},"pull_request":{"href":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/pulls/148"}}},"pull_request":{"url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/pulls/148","id":230392816,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMwMzkyODE2","html_url":"https://github.com/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/pull/148","diff_url":"https://github.com/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/pull/148.diff","patch_url":"https://github.com/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/pull/148.patch","issue_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/issues/148","number":148,"state":"open","locked":false,"title":"Updated mailroom, exception excercise.","user":{"login":"vanulor","id":44012588,"node_id":"MDQ6VXNlcjQ0MDEyNTg4","avatar_url":"https://avatars0.githubusercontent.com/u/44012588?v=4","gravatar_id":"","url":"https://api.github.com/users/vanulor","html_url":"https://github.com/vanulor","followers_url":"https://api.github.com/users/vanulor/followers","following_url":"https://api.github.com/users/vanulor/following{/other_user}","gists_url":"https://api.github.com/users/vanulor/gists{/gist_id}","starred_url":"https://api.github.com/users/vanulor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanulor/subscriptions","organizations_url":"https://api.github.com/users/vanulor/orgs","repos_url":"https://api.github.com/users/vanulor/repos","events_url":"https://api.github.com/users/vanulor/events{/privacy}","received_events_url":"https://api.github.com/users/vanulor/received_events","type":"User","site_admin":false},"body":"Refactored report, and send reports, added more functions.  Added comprehensions and exceptions.  Future work will include reworking the thank you report because it is a bit unwieldy.","created_at":"2018-11-13T08:55:02Z","updated_at":"2018-11-18T08:30:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/pulls/148/commits","review_comments_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/pulls/148/comments","review_comment_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/pulls/comments{/number}","comments_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/issues/148/comments","statuses_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/statuses/a158a3eadce249d4ed7c6cf508d1abd6b4e4a2d4","head":{"label":"vanulor:master","ref":"master","sha":"a158a3eadce249d4ed7c6cf508d1abd6b4e4a2d4","user":{"login":"vanulor","id":44012588,"node_id":"MDQ6VXNlcjQ0MDEyNTg4","avatar_url":"https://avatars0.githubusercontent.com/u/44012588?v=4","gravatar_id":"","url":"https://api.github.com/users/vanulor","html_url":"https://github.com/vanulor","followers_url":"https://api.github.com/users/vanulor/followers","following_url":"https://api.github.com/users/vanulor/following{/other_user}","gists_url":"https://api.github.com/users/vanulor/gists{/gist_id}","starred_url":"https://api.github.com/users/vanulor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanulor/subscriptions","organizations_url":"https://api.github.com/users/vanulor/orgs","repos_url":"https://api.github.com/users/vanulor/repos","events_url":"https://api.github.com/users/vanulor/events{/privacy}","received_events_url":"https://api.github.com/users/vanulor/received_events","type":"User","site_admin":false},"repo":{"id":152354402,"node_id":"MDEwOlJlcG9zaXRvcnkxNTIzNTQ0MDI=","name":"Fall2018-PY210A","full_name":"vanulor/Fall2018-PY210A","private":false,"owner":{"login":"vanulor","id":44012588,"node_id":"MDQ6VXNlcjQ0MDEyNTg4","avatar_url":"https://avatars0.githubusercontent.com/u/44012588?v=4","gravatar_id":"","url":"https://api.github.com/users/vanulor","html_url":"https://github.com/vanulor","followers_url":"https://api.github.com/users/vanulor/followers","following_url":"https://api.github.com/users/vanulor/following{/other_user}","gists_url":"https://api.github.com/users/vanulor/gists{/gist_id}","starred_url":"https://api.github.com/users/vanulor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanulor/subscriptions","organizations_url":"https://api.github.com/users/vanulor/orgs","repos_url":"https://api.github.com/users/vanulor/repos","events_url":"https://api.github.com/users/vanulor/events{/privacy}","received_events_url":"https://api.github.com/users/vanulor/received_events","type":"User","site_admin":false},"html_url":"https://github.com/vanulor/Fall2018-PY210A","description":"Class repo for Fall 2018 classroom section of Python 210A","fork":true,"url":"https://api.github.com/repos/vanulor/Fall2018-PY210A","forks_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/forks","keys_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/teams","hooks_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/hooks","issue_events_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/issues/events{/number}","events_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/events","assignees_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/assignees{/user}","branches_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/branches{/branch}","tags_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/tags","blobs_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/git/refs{/sha}","trees_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/statuses/{sha}","languages_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/languages","stargazers_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/stargazers","contributors_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/contributors","subscribers_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/subscribers","subscription_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/subscription","commits_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/commits{/sha}","git_commits_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/git/commits{/sha}","comments_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/comments{/number}","issue_comment_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/issues/comments{/number}","contents_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/contents/{+path}","compare_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/merges","archive_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/downloads","issues_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/issues{/number}","pulls_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/pulls{/number}","milestones_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/milestones{/number}","notifications_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/labels{/name}","releases_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/releases{/id}","deployments_url":"https://api.github.com/repos/vanulor/Fall2018-PY210A/deployments","created_at":"2018-10-10T02:57:38Z","updated_at":"2018-11-13T08:50:35Z","pushed_at":"2018-11-13T08:50:33Z","git_url":"git://github.com/vanulor/Fall2018-PY210A.git","ssh_url":"git@github.com:vanulor/Fall2018-PY210A.git","clone_url":"https://github.com/vanulor/Fall2018-PY210A.git","svn_url":"https://github.com/vanulor/Fall2018-PY210A","homepage":"https://uwpce-pythoncert-classrepos.github.io/Fall2018-PY210A/","size":6529,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"UWPCE-PythonCert-ClassRepos:master","ref":"master","sha":"01f2279e518fea84a8e1ede6edaee3a0d9317370","user":{"login":"UWPCE-PythonCert-ClassRepos","id":34701012,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0NzAxMDEy","avatar_url":"https://avatars0.githubusercontent.com/u/34701012?v=4","gravatar_id":"","url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos","html_url":"https://github.com/UWPCE-PythonCert-ClassRepos","followers_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/followers","following_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/following{/other_user}","gists_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/gists{/gist_id}","starred_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/subscriptions","organizations_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/orgs","repos_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/repos","events_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/events{/privacy}","received_events_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/received_events","type":"Organization","site_admin":false},"repo":{"id":151978247,"node_id":"MDEwOlJlcG9zaXRvcnkxNTE5NzgyNDc=","name":"Fall2018-PY210A","full_name":"UWPCE-PythonCert-ClassRepos/Fall2018-PY210A","private":false,"owner":{"login":"UWPCE-PythonCert-ClassRepos","id":34701012,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0NzAxMDEy","avatar_url":"https://avatars0.githubusercontent.com/u/34701012?v=4","gravatar_id":"","url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos","html_url":"https://github.com/UWPCE-PythonCert-ClassRepos","followers_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/followers","following_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/following{/other_user}","gists_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/gists{/gist_id}","starred_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/subscriptions","organizations_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/orgs","repos_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/repos","events_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/events{/privacy}","received_events_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A","description":"Class repo for Fall 2018 classroom section of Python 210A","fork":false,"url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A","forks_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/forks","keys_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/keys{/key_id}","collaborators_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/teams","hooks_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/hooks","issue_events_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/issues/events{/number}","events_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/events","assignees_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/assignees{/user}","branches_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/branches{/branch}","tags_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/tags","blobs_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/git/refs{/sha}","trees_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/git/trees{/sha}","statuses_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/statuses/{sha}","languages_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/languages","stargazers_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/stargazers","contributors_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/contributors","subscribers_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/subscribers","subscription_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/subscription","commits_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/commits{/sha}","git_commits_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/git/commits{/sha}","comments_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/comments{/number}","issue_comment_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/issues/comments{/number}","contents_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/contents/{+path}","compare_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/compare/{base}...{head}","merges_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/merges","archive_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/downloads","issues_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/issues{/number}","pulls_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/pulls{/number}","milestones_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/milestones{/number}","notifications_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/labels{/name}","releases_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/releases{/id}","deployments_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/deployments","created_at":"2018-10-07T19:38:14Z","updated_at":"2018-11-18T01:32:48Z","pushed_at":"2018-11-18T01:32:45Z","git_url":"git://github.com/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A.git","ssh_url":"git@github.com:UWPCE-PythonCert-ClassRepos/Fall2018-PY210A.git","clone_url":"https://github.com/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A.git","svn_url":"https://github.com/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A","homepage":"https://uwpce-pythoncert-classrepos.github.io/Fall2018-PY210A/","size":8461,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":34,"mirror_url":null,"archived":false,"open_issues_count":9,"license":null,"forks":34,"open_issues":9,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/pulls/148"},"html":{"href":"https://github.com/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/pull/148"},"issue":{"href":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/issues/148"},"comments":{"href":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/issues/148/comments"},"review_comments":{"href":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/pulls/148/comments"},"review_comment":{"href":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/pulls/148/commits"},"statuses":{"href":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Fall2018-PY210A/statuses/a158a3eadce249d4ed7c6cf508d1abd6b4e4a2d4"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"PythonCHB"}}