{"action":"created","comment":{"url":"https://api.github.com/repos/pfnet-research/chainer-compiler/pulls/comments/300531730","pull_request_review_id":258210056,"id":300531730,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMwMDUzMTczMA==","diff_hunk":"@@ -81,18 +72,44 @@ def c(self, value) -> 'AstContext':\n \n class VEvalOption:\n     def __init__(self):\n-        self.eval_as_written_target = False\n+        self.history = []\n+        self.flags = {\n+            \"eval_as_written_target\": False,\n+            \"ignore_branch\": False,\n+            \"for_unroll\": False\n+        }\n+\n+        deque(map(lambda flag: setattr(self.__class__, '_' + flag, property(fset=lambda obj, value: VEvalOption.generic_setter(obj, flag, value),","path":"chainer_compiler/elichika/parser/vevaluator.py","position":97,"original_position":97,"commit_id":"837c2b96b051ae2eadc8e797f9f05fb79e4905fe","original_commit_id":"837c2b96b051ae2eadc8e797f9f05fb79e4905fe","user":{"login":"Rishav1","id":9868364,"node_id":"MDQ6VXNlcjk4NjgzNjQ=","avatar_url":"https://avatars1.githubusercontent.com/u/9868364?v=4","gravatar_id":"","url":"https://api.github.com/users/Rishav1","html_url":"https://github.com/Rishav1","followers_url":"https://api.github.com/users/Rishav1/followers","following_url":"https://api.github.com/users/Rishav1/following{/other_user}","gists_url":"https://api.github.com/users/Rishav1/gists{/gist_id}","starred_url":"https://api.github.com/users/Rishav1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rishav1/subscriptions","organizations_url":"https://api.github.com/users/Rishav1/orgs","repos_url":"https://api.github.com/users/Rishav1/repos","events_url":"https://api.github.com/users/Rishav1/events{/privacy}","received_events_url":"https://api.github.com/users/Rishav1/received_events","type":"User","site_admin":false},"body":"I suspected that this behavior was due to the fact that lambda expression behaves differently than what is expected.\r\n```python\r\n>>> x = []\r\n>>> for i in range(10):\r\n...     x.append(lambda: i)\r\n... \r\n>>> x[0]()\r\n9\r\n``` ","created_at":"2019-07-05T03:34:09Z","updated_at":"2019-07-05T03:34:09Z","html_url":"https://github.com/pfnet-research/chainer-compiler/pull/436#discussion_r300531730","pull_request_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/pulls/436","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/pfnet-research/chainer-compiler/pulls/comments/300531730"},"html":{"href":"https://github.com/pfnet-research/chainer-compiler/pull/436#discussion_r300531730"},"pull_request":{"href":"https://api.github.com/repos/pfnet-research/chainer-compiler/pulls/436"}},"in_reply_to_id":300524060},"pull_request":{"url":"https://api.github.com/repos/pfnet-research/chainer-compiler/pulls/436","id":293135365,"node_id":"MDExOlB1bGxSZXF1ZXN0MjkzMTM1MzY1","html_url":"https://github.com/pfnet-research/chainer-compiler/pull/436","diff_url":"https://github.com/pfnet-research/chainer-compiler/pull/436.diff","patch_url":"https://github.com/pfnet-research/chainer-compiler/pull/436.patch","issue_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/issues/436","number":436,"state":"open","locked":false,"title":"Supporting Dict & With syntax + interface for elichika builtin flags","user":{"login":"Rishav1","id":9868364,"node_id":"MDQ6VXNlcjk4NjgzNjQ=","avatar_url":"https://avatars1.githubusercontent.com/u/9868364?v=4","gravatar_id":"","url":"https://api.github.com/users/Rishav1","html_url":"https://github.com/Rishav1","followers_url":"https://api.github.com/users/Rishav1/followers","following_url":"https://api.github.com/users/Rishav1/following{/other_user}","gists_url":"https://api.github.com/users/Rishav1/gists{/gist_id}","starred_url":"https://api.github.com/users/Rishav1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rishav1/subscriptions","organizations_url":"https://api.github.com/users/Rishav1/orgs","repos_url":"https://api.github.com/users/Rishav1/repos","events_url":"https://api.github.com/users/Rishav1/events{/privacy}","received_events_url":"https://api.github.com/users/Rishav1/received_events","type":"User","site_admin":false},"body":"- [x] Update `VEvalOption` class.\r\n- [x] Add user side support for dummy veval option flags.\r\n- [x] Add Support for `with` syntax. (User defined managers need additional support for `__enter__` and `__exit__` calls)\r\n- [x] Add support for 'Dict' syntax(1/2). (Dictionary declaration, setter and getter)\r\n- [x] Add support for 'Dict' syntax(2/2). (Dictionary functions like items, keys, ~~values~~)\r\n- [x] Add support for `ignore_branch` flag.\r\n- [x] Add support for subscript on self. (Like `self['lstm1']`)\r\n- [x] Add support for `for_unroll` flag.\r\n- [x] Add constant string propagation for % operator.\r\n- [x] Add tests for Dictionary support.\r\n- [x] Add tests for existing `for` unroll. (When the iterator list consists of only constants)\r\n- [x] Add tests for `ignore_branch` flag. ~~(Add tests for testing mismatch in output)~~\r\n- [x] Add tests for `for_unroll` flag.","created_at":"2019-06-30T21:59:54Z","updated_at":"2019-07-05T03:34:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"133c15bafc98b186fe24150c4a9b0117e7d36bb9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/pulls/436/commits","review_comments_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/pulls/436/comments","review_comment_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/issues/436/comments","statuses_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/statuses/837c2b96b051ae2eadc8e797f9f05fb79e4905fe","head":{"label":"Rishav1:ignore-unroll-support","ref":"ignore-unroll-support","sha":"837c2b96b051ae2eadc8e797f9f05fb79e4905fe","user":{"login":"Rishav1","id":9868364,"node_id":"MDQ6VXNlcjk4NjgzNjQ=","avatar_url":"https://avatars1.githubusercontent.com/u/9868364?v=4","gravatar_id":"","url":"https://api.github.com/users/Rishav1","html_url":"https://github.com/Rishav1","followers_url":"https://api.github.com/users/Rishav1/followers","following_url":"https://api.github.com/users/Rishav1/following{/other_user}","gists_url":"https://api.github.com/users/Rishav1/gists{/gist_id}","starred_url":"https://api.github.com/users/Rishav1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rishav1/subscriptions","organizations_url":"https://api.github.com/users/Rishav1/orgs","repos_url":"https://api.github.com/users/Rishav1/repos","events_url":"https://api.github.com/users/Rishav1/events{/privacy}","received_events_url":"https://api.github.com/users/Rishav1/received_events","type":"User","site_admin":false},"repo":{"id":179129520,"node_id":"MDEwOlJlcG9zaXRvcnkxNzkxMjk1MjA=","name":"chainer-compiler","full_name":"Rishav1/chainer-compiler","private":false,"owner":{"login":"Rishav1","id":9868364,"node_id":"MDQ6VXNlcjk4NjgzNjQ=","avatar_url":"https://avatars1.githubusercontent.com/u/9868364?v=4","gravatar_id":"","url":"https://api.github.com/users/Rishav1","html_url":"https://github.com/Rishav1","followers_url":"https://api.github.com/users/Rishav1/followers","following_url":"https://api.github.com/users/Rishav1/following{/other_user}","gists_url":"https://api.github.com/users/Rishav1/gists{/gist_id}","starred_url":"https://api.github.com/users/Rishav1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rishav1/subscriptions","organizations_url":"https://api.github.com/users/Rishav1/orgs","repos_url":"https://api.github.com/users/Rishav1/repos","events_url":"https://api.github.com/users/Rishav1/events{/privacy}","received_events_url":"https://api.github.com/users/Rishav1/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Rishav1/chainer-compiler","description":"Experimental toolchain to compile and run Chainer models","fork":true,"url":"https://api.github.com/repos/Rishav1/chainer-compiler","forks_url":"https://api.github.com/repos/Rishav1/chainer-compiler/forks","keys_url":"https://api.github.com/repos/Rishav1/chainer-compiler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Rishav1/chainer-compiler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Rishav1/chainer-compiler/teams","hooks_url":"https://api.github.com/repos/Rishav1/chainer-compiler/hooks","issue_events_url":"https://api.github.com/repos/Rishav1/chainer-compiler/issues/events{/number}","events_url":"https://api.github.com/repos/Rishav1/chainer-compiler/events","assignees_url":"https://api.github.com/repos/Rishav1/chainer-compiler/assignees{/user}","branches_url":"https://api.github.com/repos/Rishav1/chainer-compiler/branches{/branch}","tags_url":"https://api.github.com/repos/Rishav1/chainer-compiler/tags","blobs_url":"https://api.github.com/repos/Rishav1/chainer-compiler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Rishav1/chainer-compiler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Rishav1/chainer-compiler/git/refs{/sha}","trees_url":"https://api.github.com/repos/Rishav1/chainer-compiler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Rishav1/chainer-compiler/statuses/{sha}","languages_url":"https://api.github.com/repos/Rishav1/chainer-compiler/languages","stargazers_url":"https://api.github.com/repos/Rishav1/chainer-compiler/stargazers","contributors_url":"https://api.github.com/repos/Rishav1/chainer-compiler/contributors","subscribers_url":"https://api.github.com/repos/Rishav1/chainer-compiler/subscribers","subscription_url":"https://api.github.com/repos/Rishav1/chainer-compiler/subscription","commits_url":"https://api.github.com/repos/Rishav1/chainer-compiler/commits{/sha}","git_commits_url":"https://api.github.com/repos/Rishav1/chainer-compiler/git/commits{/sha}","comments_url":"https://api.github.com/repos/Rishav1/chainer-compiler/comments{/number}","issue_comment_url":"https://api.github.com/repos/Rishav1/chainer-compiler/issues/comments{/number}","contents_url":"https://api.github.com/repos/Rishav1/chainer-compiler/contents/{+path}","compare_url":"https://api.github.com/repos/Rishav1/chainer-compiler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Rishav1/chainer-compiler/merges","archive_url":"https://api.github.com/repos/Rishav1/chainer-compiler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Rishav1/chainer-compiler/downloads","issues_url":"https://api.github.com/repos/Rishav1/chainer-compiler/issues{/number}","pulls_url":"https://api.github.com/repos/Rishav1/chainer-compiler/pulls{/number}","milestones_url":"https://api.github.com/repos/Rishav1/chainer-compiler/milestones{/number}","notifications_url":"https://api.github.com/repos/Rishav1/chainer-compiler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Rishav1/chainer-compiler/labels{/name}","releases_url":"https://api.github.com/repos/Rishav1/chainer-compiler/releases{/id}","deployments_url":"https://api.github.com/repos/Rishav1/chainer-compiler/deployments","created_at":"2019-04-02T17:47:24Z","updated_at":"2019-07-04T05:54:01Z","pushed_at":"2019-07-04T07:51:15Z","git_url":"git://github.com/Rishav1/chainer-compiler.git","ssh_url":"git@github.com:Rishav1/chainer-compiler.git","clone_url":"https://github.com/Rishav1/chainer-compiler.git","svn_url":"https://github.com/Rishav1/chainer-compiler","homepage":null,"size":4964,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pfnet-research:master","ref":"master","sha":"9b0cfd292535a726e13197638dee5fe5c52522d3","user":{"login":"pfnet-research","id":23070723,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMDcwNzIz","avatar_url":"https://avatars2.githubusercontent.com/u/23070723?v=4","gravatar_id":"","url":"https://api.github.com/users/pfnet-research","html_url":"https://github.com/pfnet-research","followers_url":"https://api.github.com/users/pfnet-research/followers","following_url":"https://api.github.com/users/pfnet-research/following{/other_user}","gists_url":"https://api.github.com/users/pfnet-research/gists{/gist_id}","starred_url":"https://api.github.com/users/pfnet-research/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfnet-research/subscriptions","organizations_url":"https://api.github.com/users/pfnet-research/orgs","repos_url":"https://api.github.com/users/pfnet-research/repos","events_url":"https://api.github.com/users/pfnet-research/events{/privacy}","received_events_url":"https://api.github.com/users/pfnet-research/received_events","type":"Organization","site_admin":false},"repo":{"id":167481717,"node_id":"MDEwOlJlcG9zaXRvcnkxNjc0ODE3MTc=","name":"chainer-compiler","full_name":"pfnet-research/chainer-compiler","private":false,"owner":{"login":"pfnet-research","id":23070723,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMDcwNzIz","avatar_url":"https://avatars2.githubusercontent.com/u/23070723?v=4","gravatar_id":"","url":"https://api.github.com/users/pfnet-research","html_url":"https://github.com/pfnet-research","followers_url":"https://api.github.com/users/pfnet-research/followers","following_url":"https://api.github.com/users/pfnet-research/following{/other_user}","gists_url":"https://api.github.com/users/pfnet-research/gists{/gist_id}","starred_url":"https://api.github.com/users/pfnet-research/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfnet-research/subscriptions","organizations_url":"https://api.github.com/users/pfnet-research/orgs","repos_url":"https://api.github.com/users/pfnet-research/repos","events_url":"https://api.github.com/users/pfnet-research/events{/privacy}","received_events_url":"https://api.github.com/users/pfnet-research/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pfnet-research/chainer-compiler","description":"Experimental toolchain to compile and run Chainer models","fork":false,"url":"https://api.github.com/repos/pfnet-research/chainer-compiler","forks_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/forks","keys_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/teams","hooks_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/hooks","issue_events_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/issues/events{/number}","events_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/events","assignees_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/assignees{/user}","branches_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/branches{/branch}","tags_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/tags","blobs_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/git/refs{/sha}","trees_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/statuses/{sha}","languages_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/languages","stargazers_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/stargazers","contributors_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/contributors","subscribers_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/subscribers","subscription_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/subscription","commits_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/commits{/sha}","git_commits_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/git/commits{/sha}","comments_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/comments{/number}","issue_comment_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/issues/comments{/number}","contents_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/contents/{+path}","compare_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/merges","archive_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/downloads","issues_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/issues{/number}","pulls_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/pulls{/number}","milestones_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/milestones{/number}","notifications_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/labels{/name}","releases_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/releases{/id}","deployments_url":"https://api.github.com/repos/pfnet-research/chainer-compiler/deployments","created_at":"2019-01-25T03:54:26Z","updated_at":"2019-07-05T02:33:46Z","pushed_at":"2019-07-05T02:33:44Z","git_url":"git://github.com/pfnet-research/chainer-compiler.git","ssh_url":"git@github.com:pfnet-research/chainer-compiler.git","clone_url":"https://github.com/pfnet-research/chainer-compiler.git","svn_url":"https://github.com/pfnet-research/chainer-compiler","homepage":null,"size":4963,"stargazers_count":90,"watchers_count":90,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":26,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":21,"open_issues":26,"watchers":90,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pfnet-research/chainer-compiler/pulls/436"},"html":{"href":"https://github.com/pfnet-research/chainer-compiler/pull/436"},"issue":{"href":"https://api.github.com/repos/pfnet-research/chainer-compiler/issues/436"},"comments":{"href":"https://api.github.com/repos/pfnet-research/chainer-compiler/issues/436/comments"},"review_comments":{"href":"https://api.github.com/repos/pfnet-research/chainer-compiler/pulls/436/comments"},"review_comment":{"href":"https://api.github.com/repos/pfnet-research/chainer-compiler/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pfnet-research/chainer-compiler/pulls/436/commits"},"statuses":{"href":"https://api.github.com/repos/pfnet-research/chainer-compiler/statuses/837c2b96b051ae2eadc8e797f9f05fb79e4905fe"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Rishav1"}}