{"action":"created","comment":{"url":"https://api.github.com/repos/python/cpython/pulls/comments/100716617","pull_request_review_id":21427168,"id":100716617,"diff_hunk":"@@ -381,12 +398,20 @@ The fine print:\n What's the Execution Context?\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n \n-By default, each time :mod:`doctest` finds a docstring to test, it uses a\n-*shallow copy* of :mod:`M`'s globals, so that running tests doesn't change the\n-module's real globals, and so that one test in :mod:`M` can't leave behind\n-crumbs that accidentally allow another test to work.  This means examples can\n-freely use any names defined at top-level in :mod:`M`, and names defined earlier\n-in the docstring being run. Examples cannot see names defined in other\n+Within a docstring, later examples can use names defined by earlier\n+examples. It's fine for an example to set up state, and\n+have no output. \n+\n+For each docstring, :mod:`doctest` makes (by default) a \n+*shallow copy* of :mod:`M`'s globals.\n+This means examples can freely use any names defined at the top level of \n+:mod:`M`. \n+When doctest tests examples, it doesn't change the module's real globals.\n+\n+This shallow copy of globals is discarded at the end of each docstring,","path":"Doc/library/doctest.rst","position":97,"original_position":97,"commit_id":"158219b6d8e69da955b4d33e5e99ffe83cedb420","original_commit_id":"158219b6d8e69da955b4d33e5e99ffe83cedb420","user":{"login":"JDLH","id":1100216,"avatar_url":"https://avatars.githubusercontent.com/u/1100216?v=3","gravatar_id":"","url":"https://api.github.com/users/JDLH","html_url":"https://github.com/JDLH","followers_url":"https://api.github.com/users/JDLH/followers","following_url":"https://api.github.com/users/JDLH/following{/other_user}","gists_url":"https://api.github.com/users/JDLH/gists{/gist_id}","starred_url":"https://api.github.com/users/JDLH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JDLH/subscriptions","organizations_url":"https://api.github.com/users/JDLH/orgs","repos_url":"https://api.github.com/users/JDLH/repos","events_url":"https://api.github.com/users/JDLH/events{/privacy}","received_events_url":"https://api.github.com/users/JDLH/received_events","type":"User","site_admin":false},"body":"Good improvement. Thank you.","created_at":"2017-02-13T02:40:31Z","updated_at":"2017-02-13T02:44:30Z","html_url":"https://github.com/python/cpython/pull/45#discussion_r100716617","pull_request_url":"https://api.github.com/repos/python/cpython/pulls/45","_links":{"self":{"href":"https://api.github.com/repos/python/cpython/pulls/comments/100716617"},"html":{"href":"https://github.com/python/cpython/pull/45#discussion_r100716617"},"pull_request":{"href":"https://api.github.com/repos/python/cpython/pulls/45"}}},"pull_request":{"url":"https://api.github.com/repos/python/cpython/pulls/45","id":105783161,"html_url":"https://github.com/python/cpython/pull/45","diff_url":"https://github.com/python/cpython/pull/45.diff","patch_url":"https://github.com/python/cpython/pull/45.patch","issue_url":"https://api.github.com/repos/python/cpython/issues/45","number":45,"state":"open","locked":false,"title":"bpo-29428: make doctest documentation clearer","user":{"login":"JDLH","id":1100216,"avatar_url":"https://avatars.githubusercontent.com/u/1100216?v=3","gravatar_id":"","url":"https://api.github.com/users/JDLH","html_url":"https://github.com/JDLH","followers_url":"https://api.github.com/users/JDLH/followers","following_url":"https://api.github.com/users/JDLH/following{/other_user}","gists_url":"https://api.github.com/users/JDLH/gists{/gist_id}","starred_url":"https://api.github.com/users/JDLH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JDLH/subscriptions","organizations_url":"https://api.github.com/users/JDLH/orgs","repos_url":"https://api.github.com/users/JDLH/repos","events_url":"https://api.github.com/users/JDLH/events{/privacy}","received_events_url":"https://api.github.com/users/JDLH/received_events","type":"User","site_admin":false},"body":"A fix for bug bpo-29428, _Doctest documentation unclear about multi-line fixtures_.\r\n\r\nThis changes Doc/library/doctest.rst only. No code changes.\r\n\r\nClarify the introduction of section, \"How are Docstring \r\nExamples Recognized\", by moving it to above the example \r\nand rewriting for clarity. \r\n\r\nChange the example in that section to use more plausible\r\ncode, which also demonstrates a multi-line test fixture.\r\n\r\nAdd three \"fine print\" points, about the example prefix \r\nstrings, blank expected output, and multi-line expected \r\noutput.\r\n\r\nClarify the introduction of section, \"What's the Execution \r\nContext\", by rewriting for clarity, and breaking into three\r\nparagraphs. \r\n\r\nCopy-edit the first paragraph in section, \"Which Docstrings \r\nAre Examined?\".","created_at":"2017-02-12T08:01:21Z","updated_at":"2017-02-13T02:44:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"36e70d8c120b26cbf630fed248483bb4acec097d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/python/cpython/pulls/45/commits","review_comments_url":"https://api.github.com/repos/python/cpython/pulls/45/comments","review_comment_url":"https://api.github.com/repos/python/cpython/pulls/comments{/number}","comments_url":"https://api.github.com/repos/python/cpython/issues/45/comments","statuses_url":"https://api.github.com/repos/python/cpython/statuses/158219b6d8e69da955b4d33e5e99ffe83cedb420","head":{"label":"JDLH:bpo-29428_doctest_docs","ref":"bpo-29428_doctest_docs","sha":"158219b6d8e69da955b4d33e5e99ffe83cedb420","user":{"login":"JDLH","id":1100216,"avatar_url":"https://avatars.githubusercontent.com/u/1100216?v=3","gravatar_id":"","url":"https://api.github.com/users/JDLH","html_url":"https://github.com/JDLH","followers_url":"https://api.github.com/users/JDLH/followers","following_url":"https://api.github.com/users/JDLH/following{/other_user}","gists_url":"https://api.github.com/users/JDLH/gists{/gist_id}","starred_url":"https://api.github.com/users/JDLH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JDLH/subscriptions","organizations_url":"https://api.github.com/users/JDLH/orgs","repos_url":"https://api.github.com/users/JDLH/repos","events_url":"https://api.github.com/users/JDLH/events{/privacy}","received_events_url":"https://api.github.com/users/JDLH/received_events","type":"User","site_admin":false},"repo":{"id":81698527,"name":"cpython","full_name":"JDLH/cpython","owner":{"login":"JDLH","id":1100216,"avatar_url":"https://avatars.githubusercontent.com/u/1100216?v=3","gravatar_id":"","url":"https://api.github.com/users/JDLH","html_url":"https://github.com/JDLH","followers_url":"https://api.github.com/users/JDLH/followers","following_url":"https://api.github.com/users/JDLH/following{/other_user}","gists_url":"https://api.github.com/users/JDLH/gists{/gist_id}","starred_url":"https://api.github.com/users/JDLH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JDLH/subscriptions","organizations_url":"https://api.github.com/users/JDLH/orgs","repos_url":"https://api.github.com/users/JDLH/repos","events_url":"https://api.github.com/users/JDLH/events{/privacy}","received_events_url":"https://api.github.com/users/JDLH/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JDLH/cpython","description":"The Python programming language","fork":true,"url":"https://api.github.com/repos/JDLH/cpython","forks_url":"https://api.github.com/repos/JDLH/cpython/forks","keys_url":"https://api.github.com/repos/JDLH/cpython/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JDLH/cpython/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JDLH/cpython/teams","hooks_url":"https://api.github.com/repos/JDLH/cpython/hooks","issue_events_url":"https://api.github.com/repos/JDLH/cpython/issues/events{/number}","events_url":"https://api.github.com/repos/JDLH/cpython/events","assignees_url":"https://api.github.com/repos/JDLH/cpython/assignees{/user}","branches_url":"https://api.github.com/repos/JDLH/cpython/branches{/branch}","tags_url":"https://api.github.com/repos/JDLH/cpython/tags","blobs_url":"https://api.github.com/repos/JDLH/cpython/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JDLH/cpython/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JDLH/cpython/git/refs{/sha}","trees_url":"https://api.github.com/repos/JDLH/cpython/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JDLH/cpython/statuses/{sha}","languages_url":"https://api.github.com/repos/JDLH/cpython/languages","stargazers_url":"https://api.github.com/repos/JDLH/cpython/stargazers","contributors_url":"https://api.github.com/repos/JDLH/cpython/contributors","subscribers_url":"https://api.github.com/repos/JDLH/cpython/subscribers","subscription_url":"https://api.github.com/repos/JDLH/cpython/subscription","commits_url":"https://api.github.com/repos/JDLH/cpython/commits{/sha}","git_commits_url":"https://api.github.com/repos/JDLH/cpython/git/commits{/sha}","comments_url":"https://api.github.com/repos/JDLH/cpython/comments{/number}","issue_comment_url":"https://api.github.com/repos/JDLH/cpython/issues/comments{/number}","contents_url":"https://api.github.com/repos/JDLH/cpython/contents/{+path}","compare_url":"https://api.github.com/repos/JDLH/cpython/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JDLH/cpython/merges","archive_url":"https://api.github.com/repos/JDLH/cpython/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JDLH/cpython/downloads","issues_url":"https://api.github.com/repos/JDLH/cpython/issues{/number}","pulls_url":"https://api.github.com/repos/JDLH/cpython/pulls{/number}","milestones_url":"https://api.github.com/repos/JDLH/cpython/milestones{/number}","notifications_url":"https://api.github.com/repos/JDLH/cpython/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JDLH/cpython/labels{/name}","releases_url":"https://api.github.com/repos/JDLH/cpython/releases{/id}","deployments_url":"https://api.github.com/repos/JDLH/cpython/deployments","created_at":"2017-02-12T02:46:24Z","updated_at":"2017-02-12T02:46:46Z","pushed_at":"2017-02-12T07:58:02Z","git_url":"git://github.com/JDLH/cpython.git","ssh_url":"git@github.com:JDLH/cpython.git","clone_url":"https://github.com/JDLH/cpython.git","svn_url":"https://github.com/JDLH/cpython","homepage":"https://www.python.org/","size":169570,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"python:master","ref":"master","sha":"2294f3aee14a6074b17c67ef936c607430bb3c7a","user":{"login":"python","id":1525981,"avatar_url":"https://avatars.githubusercontent.com/u/1525981?v=3","gravatar_id":"","url":"https://api.github.com/users/python","html_url":"https://github.com/python","followers_url":"https://api.github.com/users/python/followers","following_url":"https://api.github.com/users/python/following{/other_user}","gists_url":"https://api.github.com/users/python/gists{/gist_id}","starred_url":"https://api.github.com/users/python/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/python/subscriptions","organizations_url":"https://api.github.com/users/python/orgs","repos_url":"https://api.github.com/users/python/repos","events_url":"https://api.github.com/users/python/events{/privacy}","received_events_url":"https://api.github.com/users/python/received_events","type":"Organization","site_admin":false},"repo":{"id":81598961,"name":"cpython","full_name":"python/cpython","owner":{"login":"python","id":1525981,"avatar_url":"https://avatars.githubusercontent.com/u/1525981?v=3","gravatar_id":"","url":"https://api.github.com/users/python","html_url":"https://github.com/python","followers_url":"https://api.github.com/users/python/followers","following_url":"https://api.github.com/users/python/following{/other_user}","gists_url":"https://api.github.com/users/python/gists{/gist_id}","starred_url":"https://api.github.com/users/python/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/python/subscriptions","organizations_url":"https://api.github.com/users/python/orgs","repos_url":"https://api.github.com/users/python/repos","events_url":"https://api.github.com/users/python/events{/privacy}","received_events_url":"https://api.github.com/users/python/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/python/cpython","description":"The Python programming language","fork":false,"url":"https://api.github.com/repos/python/cpython","forks_url":"https://api.github.com/repos/python/cpython/forks","keys_url":"https://api.github.com/repos/python/cpython/keys{/key_id}","collaborators_url":"https://api.github.com/repos/python/cpython/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/python/cpython/teams","hooks_url":"https://api.github.com/repos/python/cpython/hooks","issue_events_url":"https://api.github.com/repos/python/cpython/issues/events{/number}","events_url":"https://api.github.com/repos/python/cpython/events","assignees_url":"https://api.github.com/repos/python/cpython/assignees{/user}","branches_url":"https://api.github.com/repos/python/cpython/branches{/branch}","tags_url":"https://api.github.com/repos/python/cpython/tags","blobs_url":"https://api.github.com/repos/python/cpython/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/python/cpython/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/python/cpython/git/refs{/sha}","trees_url":"https://api.github.com/repos/python/cpython/git/trees{/sha}","statuses_url":"https://api.github.com/repos/python/cpython/statuses/{sha}","languages_url":"https://api.github.com/repos/python/cpython/languages","stargazers_url":"https://api.github.com/repos/python/cpython/stargazers","contributors_url":"https://api.github.com/repos/python/cpython/contributors","subscribers_url":"https://api.github.com/repos/python/cpython/subscribers","subscription_url":"https://api.github.com/repos/python/cpython/subscription","commits_url":"https://api.github.com/repos/python/cpython/commits{/sha}","git_commits_url":"https://api.github.com/repos/python/cpython/git/commits{/sha}","comments_url":"https://api.github.com/repos/python/cpython/comments{/number}","issue_comment_url":"https://api.github.com/repos/python/cpython/issues/comments{/number}","contents_url":"https://api.github.com/repos/python/cpython/contents/{+path}","compare_url":"https://api.github.com/repos/python/cpython/compare/{base}...{head}","merges_url":"https://api.github.com/repos/python/cpython/merges","archive_url":"https://api.github.com/repos/python/cpython/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/python/cpython/downloads","issues_url":"https://api.github.com/repos/python/cpython/issues{/number}","pulls_url":"https://api.github.com/repos/python/cpython/pulls{/number}","milestones_url":"https://api.github.com/repos/python/cpython/milestones{/number}","notifications_url":"https://api.github.com/repos/python/cpython/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/python/cpython/labels{/name}","releases_url":"https://api.github.com/repos/python/cpython/releases{/id}","deployments_url":"https://api.github.com/repos/python/cpython/deployments","created_at":"2017-02-10T19:23:51Z","updated_at":"2017-02-13T02:44:20Z","pushed_at":"2017-02-13T01:50:41Z","git_url":"git://github.com/python/cpython.git","ssh_url":"git@github.com:python/cpython.git","clone_url":"https://github.com/python/cpython.git","svn_url":"https://github.com/python/cpython","homepage":"https://www.python.org/","size":169589,"stargazers_count":2256,"watchers_count":2256,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":104,"mirror_url":null,"open_issues_count":28,"forks":104,"open_issues":28,"watchers":2256,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/python/cpython/pulls/45"},"html":{"href":"https://github.com/python/cpython/pull/45"},"issue":{"href":"https://api.github.com/repos/python/cpython/issues/45"},"comments":{"href":"https://api.github.com/repos/python/cpython/issues/45/comments"},"review_comments":{"href":"https://api.github.com/repos/python/cpython/pulls/45/comments"},"review_comment":{"href":"https://api.github.com/repos/python/cpython/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/python/cpython/pulls/45/commits"},"statuses":{"href":"https://api.github.com/repos/python/cpython/statuses/158219b6d8e69da955b4d33e5e99ffe83cedb420"}}}}
{"actor":{"display_login":"JDLH"}}