{"action":"created","comment":{"url":"https://api.github.com/repos/JuliaLang/julia/pulls/comments/242548008","pull_request_review_id":186082465,"id":242548008,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MjU0ODAwOA==","diff_hunk":"@@ -595,7 +595,11 @@ function show(io::IO, p::Pair)\n     for i = (1, 2)\n         io_i = IOContext(iocompact, :typeinfo => typeinfos[i])\n         isdelimited(io_i, p[i]) || print(io, \"(\")\n-        show(io_i, p[i])\n+        if i == 1 && isoperator(Symbol(p[i]))","path":"base/show.jl","position":5,"original_position":5,"commit_id":"1c7141ae61926dc7cbfee27b27fe4c6bc2ae556b","original_commit_id":"1c7141ae61926dc7cbfee27b27fe4c6bc2ae556b","user":{"login":"rfourquet","id":8462914,"node_id":"MDQ6VXNlcjg0NjI5MTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/8462914?v=4","gravatar_id":"","url":"https://api.github.com/users/rfourquet","html_url":"https://github.com/rfourquet","followers_url":"https://api.github.com/users/rfourquet/followers","following_url":"https://api.github.com/users/rfourquet/following{/other_user}","gists_url":"https://api.github.com/users/rfourquet/gists{/gist_id}","starred_url":"https://api.github.com/users/rfourquet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rfourquet/subscriptions","organizations_url":"https://api.github.com/users/rfourquet/orgs","repos_url":"https://api.github.com/users/rfourquet/repos","events_url":"https://api.github.com/users/rfourquet/events{/privacy}","received_events_url":"https://api.github.com/users/rfourquet/received_events","type":"User","site_admin":false},"body":"Normally this is the job for `isdelimited`: `isdelimited(io, x)` tells whether `x` will be printed with parenthesis around (or brackets, whatever) so that `show` for `Pair` doesn't need to add them itself. So in this case `isdelimited(io, x::Function) = !isoperator(Symbol(x))` should do the trick. I understand that you wanted to discriminate on whether we print the first or 2nd element of the pair, but this doesn't seem important enough for me to bypass the `isdelimited` functionality and hardcode the thing in `show(::Pair)`. ","created_at":"2018-12-18T14:04:47Z","updated_at":"2018-12-18T14:04:47Z","html_url":"https://github.com/JuliaLang/julia/pull/30427#discussion_r242548008","pull_request_url":"https://api.github.com/repos/JuliaLang/julia/pulls/30427","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/JuliaLang/julia/pulls/comments/242548008"},"html":{"href":"https://github.com/JuliaLang/julia/pull/30427#discussion_r242548008"},"pull_request":{"href":"https://api.github.com/repos/JuliaLang/julia/pulls/30427"}},"in_reply_to_id":242397443},"pull_request":{"url":"https://api.github.com/repos/JuliaLang/julia/pulls/30427","id":239323503,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM5MzIzNTAz","html_url":"https://github.com/JuliaLang/julia/pull/30427","diff_url":"https://github.com/JuliaLang/julia/pull/30427.diff","patch_url":"https://github.com/JuliaLang/julia/pull/30427.patch","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/30427","number":30427,"state":"open","locked":false,"title":"Fix display of operators in a pair","user":{"login":"sam0410","id":16623276,"node_id":"MDQ6VXNlcjE2NjIzMjc2","avatar_url":"https://avatars3.githubusercontent.com/u/16623276?v=4","gravatar_id":"","url":"https://api.github.com/users/sam0410","html_url":"https://github.com/sam0410","followers_url":"https://api.github.com/users/sam0410/followers","following_url":"https://api.github.com/users/sam0410/following{/other_user}","gists_url":"https://api.github.com/users/sam0410/gists{/gist_id}","starred_url":"https://api.github.com/users/sam0410/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sam0410/subscriptions","organizations_url":"https://api.github.com/users/sam0410/orgs","repos_url":"https://api.github.com/users/sam0410/repos","events_url":"https://api.github.com/users/sam0410/events{/privacy}","received_events_url":"https://api.github.com/users/sam0410/received_events","type":"User","site_admin":false},"body":"For Issue #29536","created_at":"2018-12-18T00:01:59Z","updated_at":"2018-12-18T14:04:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d0991116d89447a80c2dde015c63f6af946d699f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/JuliaLang/julia/pulls/30427/commits","review_comments_url":"https://api.github.com/repos/JuliaLang/julia/pulls/30427/comments","review_comment_url":"https://api.github.com/repos/JuliaLang/julia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/30427/comments","statuses_url":"https://api.github.com/repos/JuliaLang/julia/statuses/1c7141ae61926dc7cbfee27b27fe4c6bc2ae556b","head":{"label":"sam0410:dispb","ref":"dispb","sha":"1c7141ae61926dc7cbfee27b27fe4c6bc2ae556b","user":{"login":"sam0410","id":16623276,"node_id":"MDQ6VXNlcjE2NjIzMjc2","avatar_url":"https://avatars3.githubusercontent.com/u/16623276?v=4","gravatar_id":"","url":"https://api.github.com/users/sam0410","html_url":"https://github.com/sam0410","followers_url":"https://api.github.com/users/sam0410/followers","following_url":"https://api.github.com/users/sam0410/following{/other_user}","gists_url":"https://api.github.com/users/sam0410/gists{/gist_id}","starred_url":"https://api.github.com/users/sam0410/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sam0410/subscriptions","organizations_url":"https://api.github.com/users/sam0410/orgs","repos_url":"https://api.github.com/users/sam0410/repos","events_url":"https://api.github.com/users/sam0410/events{/privacy}","received_events_url":"https://api.github.com/users/sam0410/received_events","type":"User","site_admin":false},"repo":{"id":155562441,"node_id":"MDEwOlJlcG9zaXRvcnkxNTU1NjI0NDE=","name":"julia","full_name":"sam0410/julia","private":false,"owner":{"login":"sam0410","id":16623276,"node_id":"MDQ6VXNlcjE2NjIzMjc2","avatar_url":"https://avatars3.githubusercontent.com/u/16623276?v=4","gravatar_id":"","url":"https://api.github.com/users/sam0410","html_url":"https://github.com/sam0410","followers_url":"https://api.github.com/users/sam0410/followers","following_url":"https://api.github.com/users/sam0410/following{/other_user}","gists_url":"https://api.github.com/users/sam0410/gists{/gist_id}","starred_url":"https://api.github.com/users/sam0410/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sam0410/subscriptions","organizations_url":"https://api.github.com/users/sam0410/orgs","repos_url":"https://api.github.com/users/sam0410/repos","events_url":"https://api.github.com/users/sam0410/events{/privacy}","received_events_url":"https://api.github.com/users/sam0410/received_events","type":"User","site_admin":false},"html_url":"https://github.com/sam0410/julia","description":"The Julia Language: A fresh approach to technical computing.","fork":true,"url":"https://api.github.com/repos/sam0410/julia","forks_url":"https://api.github.com/repos/sam0410/julia/forks","keys_url":"https://api.github.com/repos/sam0410/julia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sam0410/julia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sam0410/julia/teams","hooks_url":"https://api.github.com/repos/sam0410/julia/hooks","issue_events_url":"https://api.github.com/repos/sam0410/julia/issues/events{/number}","events_url":"https://api.github.com/repos/sam0410/julia/events","assignees_url":"https://api.github.com/repos/sam0410/julia/assignees{/user}","branches_url":"https://api.github.com/repos/sam0410/julia/branches{/branch}","tags_url":"https://api.github.com/repos/sam0410/julia/tags","blobs_url":"https://api.github.com/repos/sam0410/julia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sam0410/julia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sam0410/julia/git/refs{/sha}","trees_url":"https://api.github.com/repos/sam0410/julia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sam0410/julia/statuses/{sha}","languages_url":"https://api.github.com/repos/sam0410/julia/languages","stargazers_url":"https://api.github.com/repos/sam0410/julia/stargazers","contributors_url":"https://api.github.com/repos/sam0410/julia/contributors","subscribers_url":"https://api.github.com/repos/sam0410/julia/subscribers","subscription_url":"https://api.github.com/repos/sam0410/julia/subscription","commits_url":"https://api.github.com/repos/sam0410/julia/commits{/sha}","git_commits_url":"https://api.github.com/repos/sam0410/julia/git/commits{/sha}","comments_url":"https://api.github.com/repos/sam0410/julia/comments{/number}","issue_comment_url":"https://api.github.com/repos/sam0410/julia/issues/comments{/number}","contents_url":"https://api.github.com/repos/sam0410/julia/contents/{+path}","compare_url":"https://api.github.com/repos/sam0410/julia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sam0410/julia/merges","archive_url":"https://api.github.com/repos/sam0410/julia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sam0410/julia/downloads","issues_url":"https://api.github.com/repos/sam0410/julia/issues{/number}","pulls_url":"https://api.github.com/repos/sam0410/julia/pulls{/number}","milestones_url":"https://api.github.com/repos/sam0410/julia/milestones{/number}","notifications_url":"https://api.github.com/repos/sam0410/julia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sam0410/julia/labels{/name}","releases_url":"https://api.github.com/repos/sam0410/julia/releases{/id}","deployments_url":"https://api.github.com/repos/sam0410/julia/deployments","created_at":"2018-10-31T13:30:34Z","updated_at":"2018-12-17T23:52:40Z","pushed_at":"2018-12-18T00:01:01Z","git_url":"git://github.com/sam0410/julia.git","ssh_url":"git@github.com:sam0410/julia.git","clone_url":"https://github.com/sam0410/julia.git","svn_url":"https://github.com/sam0410/julia","homepage":"https://julialang.org/","size":476612,"stargazers_count":0,"watchers_count":0,"language":"Julia","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"JuliaLang:master","ref":"master","sha":"046755c71afc740cf67154fc4f9fd954a8050d9a","user":{"login":"JuliaLang","id":743164,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc0MzE2NA==","avatar_url":"https://avatars0.githubusercontent.com/u/743164?v=4","gravatar_id":"","url":"https://api.github.com/users/JuliaLang","html_url":"https://github.com/JuliaLang","followers_url":"https://api.github.com/users/JuliaLang/followers","following_url":"https://api.github.com/users/JuliaLang/following{/other_user}","gists_url":"https://api.github.com/users/JuliaLang/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaLang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaLang/subscriptions","organizations_url":"https://api.github.com/users/JuliaLang/orgs","repos_url":"https://api.github.com/users/JuliaLang/repos","events_url":"https://api.github.com/users/JuliaLang/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaLang/received_events","type":"Organization","site_admin":false},"repo":{"id":1644196,"node_id":"MDEwOlJlcG9zaXRvcnkxNjQ0MTk2","name":"julia","full_name":"JuliaLang/julia","private":false,"owner":{"login":"JuliaLang","id":743164,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc0MzE2NA==","avatar_url":"https://avatars0.githubusercontent.com/u/743164?v=4","gravatar_id":"","url":"https://api.github.com/users/JuliaLang","html_url":"https://github.com/JuliaLang","followers_url":"https://api.github.com/users/JuliaLang/followers","following_url":"https://api.github.com/users/JuliaLang/following{/other_user}","gists_url":"https://api.github.com/users/JuliaLang/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaLang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaLang/subscriptions","organizations_url":"https://api.github.com/users/JuliaLang/orgs","repos_url":"https://api.github.com/users/JuliaLang/repos","events_url":"https://api.github.com/users/JuliaLang/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaLang/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/JuliaLang/julia","description":"The Julia Language: A fresh approach to technical computing.","fork":false,"url":"https://api.github.com/repos/JuliaLang/julia","forks_url":"https://api.github.com/repos/JuliaLang/julia/forks","keys_url":"https://api.github.com/repos/JuliaLang/julia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaLang/julia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaLang/julia/teams","hooks_url":"https://api.github.com/repos/JuliaLang/julia/hooks","issue_events_url":"https://api.github.com/repos/JuliaLang/julia/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaLang/julia/events","assignees_url":"https://api.github.com/repos/JuliaLang/julia/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaLang/julia/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaLang/julia/tags","blobs_url":"https://api.github.com/repos/JuliaLang/julia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaLang/julia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaLang/julia/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaLang/julia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaLang/julia/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaLang/julia/languages","stargazers_url":"https://api.github.com/repos/JuliaLang/julia/stargazers","contributors_url":"https://api.github.com/repos/JuliaLang/julia/contributors","subscribers_url":"https://api.github.com/repos/JuliaLang/julia/subscribers","subscription_url":"https://api.github.com/repos/JuliaLang/julia/subscription","commits_url":"https://api.github.com/repos/JuliaLang/julia/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaLang/julia/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaLang/julia/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaLang/julia/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaLang/julia/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaLang/julia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaLang/julia/merges","archive_url":"https://api.github.com/repos/JuliaLang/julia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaLang/julia/downloads","issues_url":"https://api.github.com/repos/JuliaLang/julia/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaLang/julia/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaLang/julia/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaLang/julia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaLang/julia/labels{/name}","releases_url":"https://api.github.com/repos/JuliaLang/julia/releases{/id}","deployments_url":"https://api.github.com/repos/JuliaLang/julia/deployments","created_at":"2011-04-21T07:01:50Z","updated_at":"2018-12-18T13:13:04Z","pushed_at":"2018-12-18T11:58:26Z","git_url":"git://github.com/JuliaLang/julia.git","ssh_url":"git@github.com:JuliaLang/julia.git","clone_url":"https://github.com/JuliaLang/julia.git","svn_url":"https://github.com/JuliaLang/julia","homepage":"https://julialang.org/","size":164353,"stargazers_count":19185,"watchers_count":19185,"language":"Julia","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3099,"mirror_url":null,"archived":false,"open_issues_count":3026,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":3099,"open_issues":3026,"watchers":19185,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JuliaLang/julia/pulls/30427"},"html":{"href":"https://github.com/JuliaLang/julia/pull/30427"},"issue":{"href":"https://api.github.com/repos/JuliaLang/julia/issues/30427"},"comments":{"href":"https://api.github.com/repos/JuliaLang/julia/issues/30427/comments"},"review_comments":{"href":"https://api.github.com/repos/JuliaLang/julia/pulls/30427/comments"},"review_comment":{"href":"https://api.github.com/repos/JuliaLang/julia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JuliaLang/julia/pulls/30427/commits"},"statuses":{"href":"https://api.github.com/repos/JuliaLang/julia/statuses/1c7141ae61926dc7cbfee27b27fe4c6bc2ae556b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"rfourquet"}}