{"action":"created","comment":{"url":"https://api.github.com/repos/astropy/astropy/pulls/comments/350236198","pull_request_review_id":322344370,"id":350236198,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM1MDIzNjE5OA==","diff_hunk":"@@ -618,6 +623,28 @@ def __init__(self, data=None, masked=False, names=None, dtype=None,\n         if self.masked not in (None, True, False):\n             raise TypeError(\"masked property must be None, True or False\")\n \n+        self._set_column_attribute('unit', units)\n+        self._set_column_attribute('description', descriptions)\n+\n+    def _set_column_attribute(self, attr, values):\n+        \"\"\"Set ``attr`` for columns to ``values``, which can be either a dict (keyed by column\n+        name) or a dict of name: value pairs.\n+        \"\"\"\n+        if not values:\n+            return\n+\n+        if isinstance(values, dict):\n+            for name, value in values.items():\n+                if name not in self.columns:","path":"astropy/table/table.py","position":35,"original_position":35,"commit_id":"4e0eea0cf2d43f6589766529028d2ebe21b2848f","original_commit_id":"eafb0b652701782c72ba1e30a006355f556517d5","user":{"login":"mhvk","id":2789820,"node_id":"MDQ6VXNlcjI3ODk4MjA=","avatar_url":"https://avatars0.githubusercontent.com/u/2789820?v=4","gravatar_id":"","url":"https://api.github.com/users/mhvk","html_url":"https://github.com/mhvk","followers_url":"https://api.github.com/users/mhvk/followers","following_url":"https://api.github.com/users/mhvk/following{/other_user}","gists_url":"https://api.github.com/users/mhvk/gists{/gist_id}","starred_url":"https://api.github.com/users/mhvk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhvk/subscriptions","organizations_url":"https://api.github.com/users/mhvk/orgs","repos_url":"https://api.github.com/users/mhvk/repos","events_url":"https://api.github.com/users/mhvk/events{/privacy}","received_events_url":"https://api.github.com/users/mhvk/received_events","type":"User","site_admin":false},"body":"Do we always make copies of the columns? (not the data, just the instance) If so, indeed, no harm done.","created_at":"2019-11-25T15:04:03Z","updated_at":"2019-11-25T15:04:03Z","html_url":"https://github.com/astropy/astropy/pull/9671#discussion_r350236198","pull_request_url":"https://api.github.com/repos/astropy/astropy/pulls/9671","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/astropy/astropy/pulls/comments/350236198"},"html":{"href":"https://github.com/astropy/astropy/pull/9671#discussion_r350236198"},"pull_request":{"href":"https://api.github.com/repos/astropy/astropy/pulls/9671"}},"in_reply_to_id":350212152},"pull_request":{"url":"https://api.github.com/repos/astropy/astropy/pulls/9671","id":345191919,"node_id":"MDExOlB1bGxSZXF1ZXN0MzQ1MTkxOTE5","html_url":"https://github.com/astropy/astropy/pull/9671","diff_url":"https://github.com/astropy/astropy/pull/9671.diff","patch_url":"https://github.com/astropy/astropy/pull/9671.patch","issue_url":"https://api.github.com/repos/astropy/astropy/issues/9671","number":9671,"state":"open","locked":false,"title":"WIP set units and descriptions in Table init [skip ci]","user":{"login":"taldcroft","id":348089,"node_id":"MDQ6VXNlcjM0ODA4OQ==","avatar_url":"https://avatars1.githubusercontent.com/u/348089?v=4","gravatar_id":"","url":"https://api.github.com/users/taldcroft","html_url":"https://github.com/taldcroft","followers_url":"https://api.github.com/users/taldcroft/followers","following_url":"https://api.github.com/users/taldcroft/following{/other_user}","gists_url":"https://api.github.com/users/taldcroft/gists{/gist_id}","starred_url":"https://api.github.com/users/taldcroft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taldcroft/subscriptions","organizations_url":"https://api.github.com/users/taldcroft/orgs","repos_url":"https://api.github.com/users/taldcroft/repos","events_url":"https://api.github.com/users/taldcroft/events{/privacy}","received_events_url":"https://api.github.com/users/taldcroft/received_events","type":"User","site_admin":false},"body":"For preliminary evaluation.\r\n\r\nTo do:\r\n- [x] Test setting descriptions\r\n- [x] Test exception\r\n- [x] Docs\r\n\r\nCloses #9639 ","created_at":"2019-11-25T12:34:24Z","updated_at":"2019-11-25T15:04:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e4540002e59045f5651ebfb86f1a4dd9c744c2df","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":229192,"node_id":"MDU6TGFiZWwyMjkxOTI=","url":"https://api.github.com/repos/astropy/astropy/labels/table","name":"table","color":"c7def8","default":false,"description":null}],"milestone":null,"commits_url":"https://api.github.com/repos/astropy/astropy/pulls/9671/commits","review_comments_url":"https://api.github.com/repos/astropy/astropy/pulls/9671/comments","review_comment_url":"https://api.github.com/repos/astropy/astropy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/astropy/astropy/issues/9671/comments","statuses_url":"https://api.github.com/repos/astropy/astropy/statuses/4e0eea0cf2d43f6589766529028d2ebe21b2848f","head":{"label":"taldcroft:table-unit-init","ref":"table-unit-init","sha":"4e0eea0cf2d43f6589766529028d2ebe21b2848f","user":{"login":"taldcroft","id":348089,"node_id":"MDQ6VXNlcjM0ODA4OQ==","avatar_url":"https://avatars1.githubusercontent.com/u/348089?v=4","gravatar_id":"","url":"https://api.github.com/users/taldcroft","html_url":"https://github.com/taldcroft","followers_url":"https://api.github.com/users/taldcroft/followers","following_url":"https://api.github.com/users/taldcroft/following{/other_user}","gists_url":"https://api.github.com/users/taldcroft/gists{/gist_id}","starred_url":"https://api.github.com/users/taldcroft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taldcroft/subscriptions","organizations_url":"https://api.github.com/users/taldcroft/orgs","repos_url":"https://api.github.com/users/taldcroft/repos","events_url":"https://api.github.com/users/taldcroft/events{/privacy}","received_events_url":"https://api.github.com/users/taldcroft/received_events","type":"User","site_admin":false},"repo":{"id":2571537,"node_id":"MDEwOlJlcG9zaXRvcnkyNTcxNTM3","name":"astropy","full_name":"taldcroft/astropy","private":false,"owner":{"login":"taldcroft","id":348089,"node_id":"MDQ6VXNlcjM0ODA4OQ==","avatar_url":"https://avatars1.githubusercontent.com/u/348089?v=4","gravatar_id":"","url":"https://api.github.com/users/taldcroft","html_url":"https://github.com/taldcroft","followers_url":"https://api.github.com/users/taldcroft/followers","following_url":"https://api.github.com/users/taldcroft/following{/other_user}","gists_url":"https://api.github.com/users/taldcroft/gists{/gist_id}","starred_url":"https://api.github.com/users/taldcroft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taldcroft/subscriptions","organizations_url":"https://api.github.com/users/taldcroft/orgs","repos_url":"https://api.github.com/users/taldcroft/repos","events_url":"https://api.github.com/users/taldcroft/events{/privacy}","received_events_url":"https://api.github.com/users/taldcroft/received_events","type":"User","site_admin":false},"html_url":"https://github.com/taldcroft/astropy","description":"Main AstroPy repository","fork":true,"url":"https://api.github.com/repos/taldcroft/astropy","forks_url":"https://api.github.com/repos/taldcroft/astropy/forks","keys_url":"https://api.github.com/repos/taldcroft/astropy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/taldcroft/astropy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/taldcroft/astropy/teams","hooks_url":"https://api.github.com/repos/taldcroft/astropy/hooks","issue_events_url":"https://api.github.com/repos/taldcroft/astropy/issues/events{/number}","events_url":"https://api.github.com/repos/taldcroft/astropy/events","assignees_url":"https://api.github.com/repos/taldcroft/astropy/assignees{/user}","branches_url":"https://api.github.com/repos/taldcroft/astropy/branches{/branch}","tags_url":"https://api.github.com/repos/taldcroft/astropy/tags","blobs_url":"https://api.github.com/repos/taldcroft/astropy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/taldcroft/astropy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/taldcroft/astropy/git/refs{/sha}","trees_url":"https://api.github.com/repos/taldcroft/astropy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/taldcroft/astropy/statuses/{sha}","languages_url":"https://api.github.com/repos/taldcroft/astropy/languages","stargazers_url":"https://api.github.com/repos/taldcroft/astropy/stargazers","contributors_url":"https://api.github.com/repos/taldcroft/astropy/contributors","subscribers_url":"https://api.github.com/repos/taldcroft/astropy/subscribers","subscription_url":"https://api.github.com/repos/taldcroft/astropy/subscription","commits_url":"https://api.github.com/repos/taldcroft/astropy/commits{/sha}","git_commits_url":"https://api.github.com/repos/taldcroft/astropy/git/commits{/sha}","comments_url":"https://api.github.com/repos/taldcroft/astropy/comments{/number}","issue_comment_url":"https://api.github.com/repos/taldcroft/astropy/issues/comments{/number}","contents_url":"https://api.github.com/repos/taldcroft/astropy/contents/{+path}","compare_url":"https://api.github.com/repos/taldcroft/astropy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/taldcroft/astropy/merges","archive_url":"https://api.github.com/repos/taldcroft/astropy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/taldcroft/astropy/downloads","issues_url":"https://api.github.com/repos/taldcroft/astropy/issues{/number}","pulls_url":"https://api.github.com/repos/taldcroft/astropy/pulls{/number}","milestones_url":"https://api.github.com/repos/taldcroft/astropy/milestones{/number}","notifications_url":"https://api.github.com/repos/taldcroft/astropy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/taldcroft/astropy/labels{/name}","releases_url":"https://api.github.com/repos/taldcroft/astropy/releases{/id}","deployments_url":"https://api.github.com/repos/taldcroft/astropy/deployments","created_at":"2011-10-13T18:44:28Z","updated_at":"2019-04-01T03:52:08Z","pushed_at":"2019-11-25T14:38:41Z","git_url":"git://github.com/taldcroft/astropy.git","ssh_url":"git@github.com:taldcroft/astropy.git","clone_url":"https://github.com/taldcroft/astropy.git","svn_url":"https://github.com/taldcroft/astropy","homepage":"astropy.org","size":75799,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":null,"forks":3,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"astropy:master","ref":"master","sha":"787ca7adb59e4d8f7d2ef3dc8e6a468040f54f7c","user":{"login":"astropy","id":847984,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg0Nzk4NA==","avatar_url":"https://avatars0.githubusercontent.com/u/847984?v=4","gravatar_id":"","url":"https://api.github.com/users/astropy","html_url":"https://github.com/astropy","followers_url":"https://api.github.com/users/astropy/followers","following_url":"https://api.github.com/users/astropy/following{/other_user}","gists_url":"https://api.github.com/users/astropy/gists{/gist_id}","starred_url":"https://api.github.com/users/astropy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astropy/subscriptions","organizations_url":"https://api.github.com/users/astropy/orgs","repos_url":"https://api.github.com/users/astropy/repos","events_url":"https://api.github.com/users/astropy/events{/privacy}","received_events_url":"https://api.github.com/users/astropy/received_events","type":"Organization","site_admin":false},"repo":{"id":2081289,"node_id":"MDEwOlJlcG9zaXRvcnkyMDgxMjg5","name":"astropy","full_name":"astropy/astropy","private":false,"owner":{"login":"astropy","id":847984,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg0Nzk4NA==","avatar_url":"https://avatars0.githubusercontent.com/u/847984?v=4","gravatar_id":"","url":"https://api.github.com/users/astropy","html_url":"https://github.com/astropy","followers_url":"https://api.github.com/users/astropy/followers","following_url":"https://api.github.com/users/astropy/following{/other_user}","gists_url":"https://api.github.com/users/astropy/gists{/gist_id}","starred_url":"https://api.github.com/users/astropy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astropy/subscriptions","organizations_url":"https://api.github.com/users/astropy/orgs","repos_url":"https://api.github.com/users/astropy/repos","events_url":"https://api.github.com/users/astropy/events{/privacy}","received_events_url":"https://api.github.com/users/astropy/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/astropy/astropy","description":"Repository for the Astropy core package","fork":false,"url":"https://api.github.com/repos/astropy/astropy","forks_url":"https://api.github.com/repos/astropy/astropy/forks","keys_url":"https://api.github.com/repos/astropy/astropy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/astropy/astropy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/astropy/astropy/teams","hooks_url":"https://api.github.com/repos/astropy/astropy/hooks","issue_events_url":"https://api.github.com/repos/astropy/astropy/issues/events{/number}","events_url":"https://api.github.com/repos/astropy/astropy/events","assignees_url":"https://api.github.com/repos/astropy/astropy/assignees{/user}","branches_url":"https://api.github.com/repos/astropy/astropy/branches{/branch}","tags_url":"https://api.github.com/repos/astropy/astropy/tags","blobs_url":"https://api.github.com/repos/astropy/astropy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/astropy/astropy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/astropy/astropy/git/refs{/sha}","trees_url":"https://api.github.com/repos/astropy/astropy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/astropy/astropy/statuses/{sha}","languages_url":"https://api.github.com/repos/astropy/astropy/languages","stargazers_url":"https://api.github.com/repos/astropy/astropy/stargazers","contributors_url":"https://api.github.com/repos/astropy/astropy/contributors","subscribers_url":"https://api.github.com/repos/astropy/astropy/subscribers","subscription_url":"https://api.github.com/repos/astropy/astropy/subscription","commits_url":"https://api.github.com/repos/astropy/astropy/commits{/sha}","git_commits_url":"https://api.github.com/repos/astropy/astropy/git/commits{/sha}","comments_url":"https://api.github.com/repos/astropy/astropy/comments{/number}","issue_comment_url":"https://api.github.com/repos/astropy/astropy/issues/comments{/number}","contents_url":"https://api.github.com/repos/astropy/astropy/contents/{+path}","compare_url":"https://api.github.com/repos/astropy/astropy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/astropy/astropy/merges","archive_url":"https://api.github.com/repos/astropy/astropy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/astropy/astropy/downloads","issues_url":"https://api.github.com/repos/astropy/astropy/issues{/number}","pulls_url":"https://api.github.com/repos/astropy/astropy/pulls{/number}","milestones_url":"https://api.github.com/repos/astropy/astropy/milestones{/number}","notifications_url":"https://api.github.com/repos/astropy/astropy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/astropy/astropy/labels{/name}","releases_url":"https://api.github.com/repos/astropy/astropy/releases{/id}","deployments_url":"https://api.github.com/repos/astropy/astropy/deployments","created_at":"2011-07-21T01:33:49Z","updated_at":"2019-11-25T14:18:46Z","pushed_at":"2019-11-25T15:03:23Z","git_url":"git://github.com/astropy/astropy.git","ssh_url":"git@github.com:astropy/astropy.git","clone_url":"https://github.com/astropy/astropy.git","svn_url":"https://github.com/astropy/astropy","homepage":"https://www.astropy.org","size":84864,"stargazers_count":2248,"watchers_count":2248,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1125,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":980,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":1125,"open_issues":980,"watchers":2248,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/astropy/astropy/pulls/9671"},"html":{"href":"https://github.com/astropy/astropy/pull/9671"},"issue":{"href":"https://api.github.com/repos/astropy/astropy/issues/9671"},"comments":{"href":"https://api.github.com/repos/astropy/astropy/issues/9671/comments"},"review_comments":{"href":"https://api.github.com/repos/astropy/astropy/pulls/9671/comments"},"review_comment":{"href":"https://api.github.com/repos/astropy/astropy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/astropy/astropy/pulls/9671/commits"},"statuses":{"href":"https://api.github.com/repos/astropy/astropy/statuses/4e0eea0cf2d43f6589766529028d2ebe21b2848f"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"mhvk"}}