{"action":"created","comment":{"url":"https://api.github.com/repos/scopatz/xonsh/pulls/comments/27097871","id":27097871,"diff_hunk":"@@ -1516,8 +1520,8 @@ def p_atom(self, p):\n             bt = '`'\n             if isinstance(p1, (ast.Num, ast.Str, ast.Bytes)):\n                 pass\n-            elif (p1 is True) or (p1 is False) or (p1 is None):\n-                p1 = ast.NameConstant(value=p1, lineno=self.lineno,\n+            elif (p1 == 'True') or (p1 == 'False') or (p1 == 'None'):\n+                p1 = ast.NameConstant(value=eval(p1), lineno=self.lineno,","path":"xonsh/parser.py","position":97,"original_position":97,"commit_id":"667c3695e4541927489f16ab3b0ba2159fc36750","original_commit_id":"667c3695e4541927489f16ab3b0ba2159fc36750","user":{"login":"scopatz","id":320553,"avatar_url":"https://avatars.githubusercontent.com/u/320553?v=3","gravatar_id":"","url":"https://api.github.com/users/scopatz","html_url":"https://github.com/scopatz","followers_url":"https://api.github.com/users/scopatz/followers","following_url":"https://api.github.com/users/scopatz/following{/other_user}","gists_url":"https://api.github.com/users/scopatz/gists{/gist_id}","starred_url":"https://api.github.com/users/scopatz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scopatz/subscriptions","organizations_url":"https://api.github.com/users/scopatz/orgs","repos_url":"https://api.github.com/users/scopatz/repos","events_url":"https://api.github.com/users/scopatz/events{/privacy}","received_events_url":"https://api.github.com/users/scopatz/received_events","type":"User","site_admin":false},"body":"It would be nice to split this out into three separate elif-statements and not eval a string that we know to be a singleton.  It is more lines of code, but likely faster overall.","created_at":"2015-03-25T06:42:01Z","updated_at":"2015-03-25T06:42:01Z","html_url":"https://github.com/scopatz/xonsh/pull/144#discussion_r27097871","pull_request_url":"https://api.github.com/repos/scopatz/xonsh/pulls/144","_links":{"self":{"href":"https://api.github.com/repos/scopatz/xonsh/pulls/comments/27097871"},"html":{"href":"https://github.com/scopatz/xonsh/pull/144#discussion_r27097871"},"pull_request":{"href":"https://api.github.com/repos/scopatz/xonsh/pulls/144"}}},"pull_request":{"url":"https://api.github.com/repos/scopatz/xonsh/pulls/144","id":31889230,"html_url":"https://github.com/scopatz/xonsh/pull/144","diff_url":"https://github.com/scopatz/xonsh/pull/144.diff","patch_url":"https://github.com/scopatz/xonsh/pull/144.patch","issue_url":"https://api.github.com/repos/scopatz/xonsh/issues/144","number":144,"state":"open","locked":false,"title":"Lexer Overhaul","user":{"login":"wrywerytwreywery","id":549404,"avatar_url":"https://avatars.githubusercontent.com/u/549404?v=3","gravatar_id":"","url":"https://api.github.com/users/wrywerytwreywery","html_url":"https://github.com/wrywerytwreywery","followers_url":"https://api.github.com/users/wrywerytwreywery/followers","following_url":"https://api.github.com/users/wrywerytwreywery/following{/other_user}","gists_url":"https://api.github.com/users/wrywerytwreywery/gists{/gist_id}","starred_url":"https://api.github.com/users/wrywerytwreywery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wrywerytwreywery/subscriptions","organizations_url":"https://api.github.com/users/wrywerytwreywery/orgs","repos_url":"https://api.github.com/users/wrywerytwreywery/repos","events_url":"https://api.github.com/users/wrywerytwreywery/events{/privacy}","received_events_url":"https://api.github.com/users/wrywerytwreywery/received_events","type":"User","site_admin":false},"body":"This patch includes a rewrite of the lexer to make use of Python's `tokenize` module, and an update of the relevant test cases to reflect these changes.\r\n\r\nI also changed the parser slightly (I think the only notable difference from a syntax perspective is that it is now illegal to have a space in between a `$` and a name in an environment lookup).\r\n\r\nAs far as I can tell, this fixes issues #133 and #134 (I have also added tests to the test suite for those issues), passes all tests, and runs the complicated examples from the tutorial as expected.","created_at":"2015-03-25T02:51:43Z","updated_at":"2015-03-25T06:42:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"085092508915a8c9c41d8495122d7d0cda536e25","assignee":null,"milestone":{"url":"https://api.github.com/repos/scopatz/xonsh/milestones/1","html_url":"https://github.com/scopatz/xonsh/milestones/v0.2","labels_url":"https://api.github.com/repos/scopatz/xonsh/milestones/1/labels","id":1013181,"number":1,"title":"v0.2","description":"","creator":{"login":"scopatz","id":320553,"avatar_url":"https://avatars.githubusercontent.com/u/320553?v=3","gravatar_id":"","url":"https://api.github.com/users/scopatz","html_url":"https://github.com/scopatz","followers_url":"https://api.github.com/users/scopatz/followers","following_url":"https://api.github.com/users/scopatz/following{/other_user}","gists_url":"https://api.github.com/users/scopatz/gists{/gist_id}","starred_url":"https://api.github.com/users/scopatz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scopatz/subscriptions","organizations_url":"https://api.github.com/users/scopatz/orgs","repos_url":"https://api.github.com/users/scopatz/repos","events_url":"https://api.github.com/users/scopatz/events{/privacy}","received_events_url":"https://api.github.com/users/scopatz/received_events","type":"User","site_admin":false},"open_issues":33,"closed_issues":104,"state":"open","created_at":"2015-03-09T18:29:10Z","updated_at":"2015-03-25T05:25:34Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/scopatz/xonsh/pulls/144/commits","review_comments_url":"https://api.github.com/repos/scopatz/xonsh/pulls/144/comments","review_comment_url":"https://api.github.com/repos/scopatz/xonsh/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scopatz/xonsh/issues/144/comments","statuses_url":"https://api.github.com/repos/scopatz/xonsh/statuses/667c3695e4541927489f16ab3b0ba2159fc36750","head":{"label":"wrywerytwreywery:master","ref":"master","sha":"667c3695e4541927489f16ab3b0ba2159fc36750","user":{"login":"wrywerytwreywery","id":549404,"avatar_url":"https://avatars.githubusercontent.com/u/549404?v=3","gravatar_id":"","url":"https://api.github.com/users/wrywerytwreywery","html_url":"https://github.com/wrywerytwreywery","followers_url":"https://api.github.com/users/wrywerytwreywery/followers","following_url":"https://api.github.com/users/wrywerytwreywery/following{/other_user}","gists_url":"https://api.github.com/users/wrywerytwreywery/gists{/gist_id}","starred_url":"https://api.github.com/users/wrywerytwreywery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wrywerytwreywery/subscriptions","organizations_url":"https://api.github.com/users/wrywerytwreywery/orgs","repos_url":"https://api.github.com/users/wrywerytwreywery/repos","events_url":"https://api.github.com/users/wrywerytwreywery/events{/privacy}","received_events_url":"https://api.github.com/users/wrywerytwreywery/received_events","type":"User","site_admin":false},"repo":{"id":32187841,"name":"xonsh","full_name":"wrywerytwreywery/xonsh","owner":{"login":"wrywerytwreywery","id":549404,"avatar_url":"https://avatars.githubusercontent.com/u/549404?v=3","gravatar_id":"","url":"https://api.github.com/users/wrywerytwreywery","html_url":"https://github.com/wrywerytwreywery","followers_url":"https://api.github.com/users/wrywerytwreywery/followers","following_url":"https://api.github.com/users/wrywerytwreywery/following{/other_user}","gists_url":"https://api.github.com/users/wrywerytwreywery/gists{/gist_id}","starred_url":"https://api.github.com/users/wrywerytwreywery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wrywerytwreywery/subscriptions","organizations_url":"https://api.github.com/users/wrywerytwreywery/orgs","repos_url":"https://api.github.com/users/wrywerytwreywery/repos","events_url":"https://api.github.com/users/wrywerytwreywery/events{/privacy}","received_events_url":"https://api.github.com/users/wrywerytwreywery/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wrywerytwreywery/xonsh","description":"xonsh is a Python-ish, BASHwards-compatible shell.","fork":true,"url":"https://api.github.com/repos/wrywerytwreywery/xonsh","forks_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/forks","keys_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/teams","hooks_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/hooks","issue_events_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/issues/events{/number}","events_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/events","assignees_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/assignees{/user}","branches_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/branches{/branch}","tags_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/tags","blobs_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/git/refs{/sha}","trees_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/statuses/{sha}","languages_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/languages","stargazers_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/stargazers","contributors_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/contributors","subscribers_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/subscribers","subscription_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/subscription","commits_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/commits{/sha}","git_commits_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/git/commits{/sha}","comments_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/comments{/number}","issue_comment_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/issues/comments{/number}","contents_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/contents/{+path}","compare_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/merges","archive_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/downloads","issues_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/issues{/number}","pulls_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/pulls{/number}","milestones_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/milestones{/number}","notifications_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/labels{/name}","releases_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/releases{/id}","created_at":"2015-03-14T00:10:49Z","updated_at":"2015-03-25T03:29:25Z","pushed_at":"2015-03-25T03:29:25Z","git_url":"git://github.com/wrywerytwreywery/xonsh.git","ssh_url":"git@github.com:wrywerytwreywery/xonsh.git","clone_url":"https://github.com/wrywerytwreywery/xonsh.git","svn_url":"https://github.com/wrywerytwreywery/xonsh","homepage":"http://xonsh.org","size":2100,"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":"scopatz:master","ref":"master","sha":"40ba8e5fe2a66d0427547aa38dedcd7a904fe256","user":{"login":"scopatz","id":320553,"avatar_url":"https://avatars.githubusercontent.com/u/320553?v=3","gravatar_id":"","url":"https://api.github.com/users/scopatz","html_url":"https://github.com/scopatz","followers_url":"https://api.github.com/users/scopatz/followers","following_url":"https://api.github.com/users/scopatz/following{/other_user}","gists_url":"https://api.github.com/users/scopatz/gists{/gist_id}","starred_url":"https://api.github.com/users/scopatz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scopatz/subscriptions","organizations_url":"https://api.github.com/users/scopatz/orgs","repos_url":"https://api.github.com/users/scopatz/repos","events_url":"https://api.github.com/users/scopatz/events{/privacy}","received_events_url":"https://api.github.com/users/scopatz/received_events","type":"User","site_admin":false},"repo":{"id":29620400,"name":"xonsh","full_name":"scopatz/xonsh","owner":{"login":"scopatz","id":320553,"avatar_url":"https://avatars.githubusercontent.com/u/320553?v=3","gravatar_id":"","url":"https://api.github.com/users/scopatz","html_url":"https://github.com/scopatz","followers_url":"https://api.github.com/users/scopatz/followers","following_url":"https://api.github.com/users/scopatz/following{/other_user}","gists_url":"https://api.github.com/users/scopatz/gists{/gist_id}","starred_url":"https://api.github.com/users/scopatz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scopatz/subscriptions","organizations_url":"https://api.github.com/users/scopatz/orgs","repos_url":"https://api.github.com/users/scopatz/repos","events_url":"https://api.github.com/users/scopatz/events{/privacy}","received_events_url":"https://api.github.com/users/scopatz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/scopatz/xonsh","description":"xonsh is a Python-ish, BASHwards-compatible shell.","fork":false,"url":"https://api.github.com/repos/scopatz/xonsh","forks_url":"https://api.github.com/repos/scopatz/xonsh/forks","keys_url":"https://api.github.com/repos/scopatz/xonsh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scopatz/xonsh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scopatz/xonsh/teams","hooks_url":"https://api.github.com/repos/scopatz/xonsh/hooks","issue_events_url":"https://api.github.com/repos/scopatz/xonsh/issues/events{/number}","events_url":"https://api.github.com/repos/scopatz/xonsh/events","assignees_url":"https://api.github.com/repos/scopatz/xonsh/assignees{/user}","branches_url":"https://api.github.com/repos/scopatz/xonsh/branches{/branch}","tags_url":"https://api.github.com/repos/scopatz/xonsh/tags","blobs_url":"https://api.github.com/repos/scopatz/xonsh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scopatz/xonsh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scopatz/xonsh/git/refs{/sha}","trees_url":"https://api.github.com/repos/scopatz/xonsh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scopatz/xonsh/statuses/{sha}","languages_url":"https://api.github.com/repos/scopatz/xonsh/languages","stargazers_url":"https://api.github.com/repos/scopatz/xonsh/stargazers","contributors_url":"https://api.github.com/repos/scopatz/xonsh/contributors","subscribers_url":"https://api.github.com/repos/scopatz/xonsh/subscribers","subscription_url":"https://api.github.com/repos/scopatz/xonsh/subscription","commits_url":"https://api.github.com/repos/scopatz/xonsh/commits{/sha}","git_commits_url":"https://api.github.com/repos/scopatz/xonsh/git/commits{/sha}","comments_url":"https://api.github.com/repos/scopatz/xonsh/comments{/number}","issue_comment_url":"https://api.github.com/repos/scopatz/xonsh/issues/comments{/number}","contents_url":"https://api.github.com/repos/scopatz/xonsh/contents/{+path}","compare_url":"https://api.github.com/repos/scopatz/xonsh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scopatz/xonsh/merges","archive_url":"https://api.github.com/repos/scopatz/xonsh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scopatz/xonsh/downloads","issues_url":"https://api.github.com/repos/scopatz/xonsh/issues{/number}","pulls_url":"https://api.github.com/repos/scopatz/xonsh/pulls{/number}","milestones_url":"https://api.github.com/repos/scopatz/xonsh/milestones{/number}","notifications_url":"https://api.github.com/repos/scopatz/xonsh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scopatz/xonsh/labels{/name}","releases_url":"https://api.github.com/repos/scopatz/xonsh/releases{/id}","created_at":"2015-01-21T22:05:27Z","updated_at":"2015-03-25T06:11:29Z","pushed_at":"2015-03-25T03:29:27Z","git_url":"git://github.com/scopatz/xonsh.git","ssh_url":"git@github.com:scopatz/xonsh.git","clone_url":"https://github.com/scopatz/xonsh.git","svn_url":"https://github.com/scopatz/xonsh","homepage":"http://xonsh.org","size":3736,"stargazers_count":339,"watchers_count":339,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"open_issues_count":36,"forks":26,"open_issues":36,"watchers":339,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scopatz/xonsh/pulls/144"},"html":{"href":"https://github.com/scopatz/xonsh/pull/144"},"issue":{"href":"https://api.github.com/repos/scopatz/xonsh/issues/144"},"comments":{"href":"https://api.github.com/repos/scopatz/xonsh/issues/144/comments"},"review_comments":{"href":"https://api.github.com/repos/scopatz/xonsh/pulls/144/comments"},"review_comment":{"href":"https://api.github.com/repos/scopatz/xonsh/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scopatz/xonsh/pulls/144/commits"},"statuses":{"href":"https://api.github.com/repos/scopatz/xonsh/statuses/667c3695e4541927489f16ab3b0ba2159fc36750"}}}}