{"action":"created","comment":{"url":"https://api.github.com/repos/pybee/voc/pulls/comments/106576575","pull_request_review_id":27504579,"id":106576575,"diff_hunk":"@@ -394,10 +394,65 @@ public static void initializeModule(java.lang.Class cls, java.util.Map<java.lang\n                     \"As repr(), return a string containing a printable representation of an\\n\" +\n                     \"object, but escape the non-ASCII characters in the string returned by\\n\" +\n                     \"repr() using \\\\x, \\\\u or \\\\U escapes.  This generates a string similar\\n\" +\n-                    \"to that returned by repr() in Python 2.\\n\"\n+                    \"to that returned by repr() in Python 2.\\n\",\n+            args = {\"object\"}\n     )\n-    public static org.python.types.Str ascii() {\n-        throw new org.python.exceptions.NotImplementedError(\"Builtin function 'ascii' not implemented\");\n+    public static org.python.types.Str ascii(org.python.Object object) {\n+        boolean isString = false;\n+        if (object instanceof  org.python.types.Str) {\n+            isString = true;\n+        }\n+        java.lang.String s = ((org.python.types.Str) object.__repr__()).value;\n+        StringBuilder resultString = new StringBuilder();\n+\n+        if (s.length() == 3) {\n+            if (s.charAt(0) == 39 && s.charAt(1) == 39 && s.charAt(2) == 39) {\n+                return new org.python.types.Str(\"\\\"'\\\"\");\n+            }\n+        }\n+\n+        for (int i = 0; i < s.length(); i++) {\n+            java.lang.Character c = s.charAt(i);","path":"python/common/org/Python.java","position":25,"original_position":25,"commit_id":"68121f5ac9b0d0068d228e8229259dd436c1daf0","original_commit_id":"68121f5ac9b0d0068d228e8229259dd436c1daf0","user":{"login":"cflee","id":8225175,"avatar_url":"https://avatars2.githubusercontent.com/u/8225175?v=3","gravatar_id":"","url":"https://api.github.com/users/cflee","html_url":"https://github.com/cflee","followers_url":"https://api.github.com/users/cflee/followers","following_url":"https://api.github.com/users/cflee/following{/other_user}","gists_url":"https://api.github.com/users/cflee/gists{/gist_id}","starred_url":"https://api.github.com/users/cflee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cflee/subscriptions","organizations_url":"https://api.github.com/users/cflee/orgs","repos_url":"https://api.github.com/users/cflee/repos","events_url":"https://api.github.com/users/cflee/events{/privacy}","received_events_url":"https://api.github.com/users/cflee/received_events","type":"User","site_admin":false},"body":"`java.lang.String.charAt()` actually returns a primitive `char` – this is autoboxing it to a `Character` object, which isn't necessary. All your subsequent usage of `c` seems to be relying on the autounboxing to get a primitive `char` (which is often then implicitly cast to `int`).","created_at":"2017-03-17T03:14:57Z","updated_at":"2017-03-17T03:36:13Z","html_url":"https://github.com/pybee/voc/pull/429#discussion_r106576575","pull_request_url":"https://api.github.com/repos/pybee/voc/pulls/429","_links":{"self":{"href":"https://api.github.com/repos/pybee/voc/pulls/comments/106576575"},"html":{"href":"https://github.com/pybee/voc/pull/429#discussion_r106576575"},"pull_request":{"href":"https://api.github.com/repos/pybee/voc/pulls/429"}}},"pull_request":{"url":"https://api.github.com/repos/pybee/voc/pulls/429","id":110996904,"html_url":"https://github.com/pybee/voc/pull/429","diff_url":"https://github.com/pybee/voc/pull/429.diff","patch_url":"https://github.com/pybee/voc/pull/429.patch","issue_url":"https://api.github.com/repos/pybee/voc/issues/429","number":429,"state":"open","locked":false,"title":"Added implementation of builtin function ascii().","user":{"login":"gEt-rIgHt-jR","id":19431338,"avatar_url":"https://avatars2.githubusercontent.com/u/19431338?v=3","gravatar_id":"","url":"https://api.github.com/users/gEt-rIgHt-jR","html_url":"https://github.com/gEt-rIgHt-jR","followers_url":"https://api.github.com/users/gEt-rIgHt-jR/followers","following_url":"https://api.github.com/users/gEt-rIgHt-jR/following{/other_user}","gists_url":"https://api.github.com/users/gEt-rIgHt-jR/gists{/gist_id}","starred_url":"https://api.github.com/users/gEt-rIgHt-jR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gEt-rIgHt-jR/subscriptions","organizations_url":"https://api.github.com/users/gEt-rIgHt-jR/orgs","repos_url":"https://api.github.com/users/gEt-rIgHt-jR/repos","events_url":"https://api.github.com/users/gEt-rIgHt-jR/events{/privacy}","received_events_url":"https://api.github.com/users/gEt-rIgHt-jR/received_events","type":"User","site_admin":false},"body":"Created new branch | [Original pull request](https://github.com/pybee/voc/pull/425) \r\n* Removed some tests from `not_implemented` list\r\n* `test_frozenset` fails because it is not implemented\r\n* `test_class` , `test_complex` , `test_slice` fail because `__repr__()` doesn't give correct output\r\n* `test_str` fails because, for strings like `hôvèrçràft` , `__repr__()` doesn't work (in CPython also)","created_at":"2017-03-16T05:38:40Z","updated_at":"2017-03-17T03:36:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3ad034403a52db56daf8db2de49794843287c94e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/pybee/voc/pulls/429/commits","review_comments_url":"https://api.github.com/repos/pybee/voc/pulls/429/comments","review_comment_url":"https://api.github.com/repos/pybee/voc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pybee/voc/issues/429/comments","statuses_url":"https://api.github.com/repos/pybee/voc/statuses/68121f5ac9b0d0068d228e8229259dd436c1daf0","head":{"label":"gEt-rIgHt-jR:ascii","ref":"ascii","sha":"68121f5ac9b0d0068d228e8229259dd436c1daf0","user":{"login":"gEt-rIgHt-jR","id":19431338,"avatar_url":"https://avatars2.githubusercontent.com/u/19431338?v=3","gravatar_id":"","url":"https://api.github.com/users/gEt-rIgHt-jR","html_url":"https://github.com/gEt-rIgHt-jR","followers_url":"https://api.github.com/users/gEt-rIgHt-jR/followers","following_url":"https://api.github.com/users/gEt-rIgHt-jR/following{/other_user}","gists_url":"https://api.github.com/users/gEt-rIgHt-jR/gists{/gist_id}","starred_url":"https://api.github.com/users/gEt-rIgHt-jR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gEt-rIgHt-jR/subscriptions","organizations_url":"https://api.github.com/users/gEt-rIgHt-jR/orgs","repos_url":"https://api.github.com/users/gEt-rIgHt-jR/repos","events_url":"https://api.github.com/users/gEt-rIgHt-jR/events{/privacy}","received_events_url":"https://api.github.com/users/gEt-rIgHt-jR/received_events","type":"User","site_admin":false},"repo":{"id":83581690,"name":"voc","full_name":"gEt-rIgHt-jR/voc","owner":{"login":"gEt-rIgHt-jR","id":19431338,"avatar_url":"https://avatars2.githubusercontent.com/u/19431338?v=3","gravatar_id":"","url":"https://api.github.com/users/gEt-rIgHt-jR","html_url":"https://github.com/gEt-rIgHt-jR","followers_url":"https://api.github.com/users/gEt-rIgHt-jR/followers","following_url":"https://api.github.com/users/gEt-rIgHt-jR/following{/other_user}","gists_url":"https://api.github.com/users/gEt-rIgHt-jR/gists{/gist_id}","starred_url":"https://api.github.com/users/gEt-rIgHt-jR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gEt-rIgHt-jR/subscriptions","organizations_url":"https://api.github.com/users/gEt-rIgHt-jR/orgs","repos_url":"https://api.github.com/users/gEt-rIgHt-jR/repos","events_url":"https://api.github.com/users/gEt-rIgHt-jR/events{/privacy}","received_events_url":"https://api.github.com/users/gEt-rIgHt-jR/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gEt-rIgHt-jR/voc","description":" A transpiler that converts Python bytecode into Java bytecode.","fork":true,"url":"https://api.github.com/repos/gEt-rIgHt-jR/voc","forks_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/forks","keys_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/teams","hooks_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/hooks","issue_events_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/issues/events{/number}","events_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/events","assignees_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/assignees{/user}","branches_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/branches{/branch}","tags_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/tags","blobs_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/git/refs{/sha}","trees_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/statuses/{sha}","languages_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/languages","stargazers_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/stargazers","contributors_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/contributors","subscribers_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/subscribers","subscription_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/subscription","commits_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/commits{/sha}","git_commits_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/git/commits{/sha}","comments_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/comments{/number}","issue_comment_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/issues/comments{/number}","contents_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/contents/{+path}","compare_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/merges","archive_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/downloads","issues_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/issues{/number}","pulls_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/pulls{/number}","milestones_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/milestones{/number}","notifications_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/labels{/name}","releases_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/releases{/id}","deployments_url":"https://api.github.com/repos/gEt-rIgHt-jR/voc/deployments","created_at":"2017-03-01T17:26:02Z","updated_at":"2017-03-01T17:26:04Z","pushed_at":"2017-03-16T05:29:38Z","git_url":"git://github.com/gEt-rIgHt-jR/voc.git","ssh_url":"git@github.com:gEt-rIgHt-jR/voc.git","clone_url":"https://github.com/gEt-rIgHt-jR/voc.git","svn_url":"https://github.com/gEt-rIgHt-jR/voc","homepage":null,"size":12205,"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":"pybee:master","ref":"master","sha":"a81a9920cfba44e71681532606c7af2d713fe21b","user":{"login":"pybee","id":5001767,"avatar_url":"https://avatars3.githubusercontent.com/u/5001767?v=3","gravatar_id":"","url":"https://api.github.com/users/pybee","html_url":"https://github.com/pybee","followers_url":"https://api.github.com/users/pybee/followers","following_url":"https://api.github.com/users/pybee/following{/other_user}","gists_url":"https://api.github.com/users/pybee/gists{/gist_id}","starred_url":"https://api.github.com/users/pybee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pybee/subscriptions","organizations_url":"https://api.github.com/users/pybee/orgs","repos_url":"https://api.github.com/users/pybee/repos","events_url":"https://api.github.com/users/pybee/events{/privacy}","received_events_url":"https://api.github.com/users/pybee/received_events","type":"Organization","site_admin":false},"repo":{"id":40796389,"name":"voc","full_name":"pybee/voc","owner":{"login":"pybee","id":5001767,"avatar_url":"https://avatars3.githubusercontent.com/u/5001767?v=3","gravatar_id":"","url":"https://api.github.com/users/pybee","html_url":"https://github.com/pybee","followers_url":"https://api.github.com/users/pybee/followers","following_url":"https://api.github.com/users/pybee/following{/other_user}","gists_url":"https://api.github.com/users/pybee/gists{/gist_id}","starred_url":"https://api.github.com/users/pybee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pybee/subscriptions","organizations_url":"https://api.github.com/users/pybee/orgs","repos_url":"https://api.github.com/users/pybee/repos","events_url":"https://api.github.com/users/pybee/events{/privacy}","received_events_url":"https://api.github.com/users/pybee/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pybee/voc","description":" A transpiler that converts Python code into Java bytecode","fork":false,"url":"https://api.github.com/repos/pybee/voc","forks_url":"https://api.github.com/repos/pybee/voc/forks","keys_url":"https://api.github.com/repos/pybee/voc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pybee/voc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pybee/voc/teams","hooks_url":"https://api.github.com/repos/pybee/voc/hooks","issue_events_url":"https://api.github.com/repos/pybee/voc/issues/events{/number}","events_url":"https://api.github.com/repos/pybee/voc/events","assignees_url":"https://api.github.com/repos/pybee/voc/assignees{/user}","branches_url":"https://api.github.com/repos/pybee/voc/branches{/branch}","tags_url":"https://api.github.com/repos/pybee/voc/tags","blobs_url":"https://api.github.com/repos/pybee/voc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pybee/voc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pybee/voc/git/refs{/sha}","trees_url":"https://api.github.com/repos/pybee/voc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pybee/voc/statuses/{sha}","languages_url":"https://api.github.com/repos/pybee/voc/languages","stargazers_url":"https://api.github.com/repos/pybee/voc/stargazers","contributors_url":"https://api.github.com/repos/pybee/voc/contributors","subscribers_url":"https://api.github.com/repos/pybee/voc/subscribers","subscription_url":"https://api.github.com/repos/pybee/voc/subscription","commits_url":"https://api.github.com/repos/pybee/voc/commits{/sha}","git_commits_url":"https://api.github.com/repos/pybee/voc/git/commits{/sha}","comments_url":"https://api.github.com/repos/pybee/voc/comments{/number}","issue_comment_url":"https://api.github.com/repos/pybee/voc/issues/comments{/number}","contents_url":"https://api.github.com/repos/pybee/voc/contents/{+path}","compare_url":"https://api.github.com/repos/pybee/voc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pybee/voc/merges","archive_url":"https://api.github.com/repos/pybee/voc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pybee/voc/downloads","issues_url":"https://api.github.com/repos/pybee/voc/issues{/number}","pulls_url":"https://api.github.com/repos/pybee/voc/pulls{/number}","milestones_url":"https://api.github.com/repos/pybee/voc/milestones{/number}","notifications_url":"https://api.github.com/repos/pybee/voc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pybee/voc/labels{/name}","releases_url":"https://api.github.com/repos/pybee/voc/releases{/id}","deployments_url":"https://api.github.com/repos/pybee/voc/deployments","created_at":"2015-08-16T02:36:42Z","updated_at":"2017-03-16T18:06:22Z","pushed_at":"2017-03-17T03:25:19Z","git_url":"git://github.com/pybee/voc.git","ssh_url":"git@github.com:pybee/voc.git","clone_url":"https://github.com/pybee/voc.git","svn_url":"https://github.com/pybee/voc","homepage":"http://pybee.org/voc","size":12202,"stargazers_count":442,"watchers_count":442,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":227,"mirror_url":null,"open_issues_count":53,"forks":227,"open_issues":53,"watchers":442,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pybee/voc/pulls/429"},"html":{"href":"https://github.com/pybee/voc/pull/429"},"issue":{"href":"https://api.github.com/repos/pybee/voc/issues/429"},"comments":{"href":"https://api.github.com/repos/pybee/voc/issues/429/comments"},"review_comments":{"href":"https://api.github.com/repos/pybee/voc/pulls/429/comments"},"review_comment":{"href":"https://api.github.com/repos/pybee/voc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pybee/voc/pulls/429/commits"},"statuses":{"href":"https://api.github.com/repos/pybee/voc/statuses/68121f5ac9b0d0068d228e8229259dd436c1daf0"}}}}
{"actor":{"display_login":"cflee"}}