{"action":"created","comment":{"url":"https://api.github.com/repos/mila-udem/blocks/pulls/comments/62327362","id":62327362,"diff_hunk":"@@ -325,9 +325,9 @@ def __init__(self, match_dim, state_transformer=None,\n         self.energy_computer = energy_computer\n \n         children = [self.state_transformers, attended_transformer,\n-                    energy_computer] + kwargs.get('children', [])\n-        super(SequenceContentAttention, self).__init__(children=children,\n-                                                       **kwargs)\n+                    energy_computer]\n+        kwargs.setdefault('children', []).extend(children)","path":"blocks/bricks/attention.py","position":8,"original_position":8,"commit_id":"4fbde838c1db3c683089b896a646e6fa02f3760d","original_commit_id":"4fbde838c1db3c683089b896a646e6fa02f3760d","user":{"login":"rizar","id":654434,"avatar_url":"https://avatars.githubusercontent.com/u/654434?v=3","gravatar_id":"","url":"https://api.github.com/users/rizar","html_url":"https://github.com/rizar","followers_url":"https://api.github.com/users/rizar/followers","following_url":"https://api.github.com/users/rizar/following{/other_user}","gists_url":"https://api.github.com/users/rizar/gists{/gist_id}","starred_url":"https://api.github.com/users/rizar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rizar/subscriptions","organizations_url":"https://api.github.com/users/rizar/orgs","repos_url":"https://api.github.com/users/rizar/repos","events_url":"https://api.github.com/users/rizar/events{/privacy}","received_events_url":"https://api.github.com/users/rizar/received_events","type":"User","site_admin":false},"body":"Wow, this is pretty cool :)","created_at":"2016-05-06T13:12:20Z","updated_at":"2016-05-06T13:12:20Z","html_url":"https://github.com/mila-udem/blocks/pull/1078#discussion_r62327362","pull_request_url":"https://api.github.com/repos/mila-udem/blocks/pulls/1078","_links":{"self":{"href":"https://api.github.com/repos/mila-udem/blocks/pulls/comments/62327362"},"html":{"href":"https://github.com/mila-udem/blocks/pull/1078#discussion_r62327362"},"pull_request":{"href":"https://api.github.com/repos/mila-udem/blocks/pulls/1078"}}},"pull_request":{"url":"https://api.github.com/repos/mila-udem/blocks/pulls/1078","id":68959403,"html_url":"https://github.com/mila-udem/blocks/pull/1078","diff_url":"https://github.com/mila-udem/blocks/pull/1078.diff","patch_url":"https://github.com/mila-udem/blocks/pull/1078.patch","issue_url":"https://api.github.com/repos/mila-udem/blocks/issues/1078","number":1078,"state":"closed","locked":false,"title":"Handle adding children to kwargs appropriately if a subclass has already added children.","user":{"login":"SwordYork","id":1974742,"avatar_url":"https://avatars.githubusercontent.com/u/1974742?v=3","gravatar_id":"","url":"https://api.github.com/users/SwordYork","html_url":"https://github.com/SwordYork","followers_url":"https://api.github.com/users/SwordYork/followers","following_url":"https://api.github.com/users/SwordYork/following{/other_user}","gists_url":"https://api.github.com/users/SwordYork/gists{/gist_id}","starred_url":"https://api.github.com/users/SwordYork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SwordYork/subscriptions","organizations_url":"https://api.github.com/users/SwordYork/orgs","repos_url":"https://api.github.com/users/SwordYork/repos","events_url":"https://api.github.com/users/SwordYork/events{/privacy}","received_events_url":"https://api.github.com/users/SwordYork/received_events","type":"User","site_admin":false},"body":"If we use `kwargs.get('children', [])` and initialize the super class by \r\n\r\n```\r\nsuper(Class2, self).__init__(children=children,  **kwargs)\r\n```\r\nThen it will result the following error if the `kwargs` contains children, because we have pass the children twice.\r\n```\r\n    super(Class2, self).__init__(children=children, **kwargs)\r\nTypeError: __init__() got multiple values for keyword argument 'children'\r\n```\r\n\r\nI'm not sure why using `kwargs.get('children', [])` in #1029 . In my opinion, we should use  `kwargs.pop('children', [])`.\r\n","created_at":"2016-05-05T02:22:53Z","updated_at":"2016-05-06T13:12:20Z","closed_at":"2016-05-05T06:27:23Z","merged_at":"2016-05-05T06:27:23Z","merge_commit_sha":"bf89d49e64060aa0a52ddadaf420334359bb3cc9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mila-udem/blocks/pulls/1078/commits","review_comments_url":"https://api.github.com/repos/mila-udem/blocks/pulls/1078/comments","review_comment_url":"https://api.github.com/repos/mila-udem/blocks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mila-udem/blocks/issues/1078/comments","statuses_url":"https://api.github.com/repos/mila-udem/blocks/statuses/4fbde838c1db3c683089b896a646e6fa02f3760d","head":{"label":"SwordYork:master","ref":"master","sha":"4fbde838c1db3c683089b896a646e6fa02f3760d","user":{"login":"SwordYork","id":1974742,"avatar_url":"https://avatars.githubusercontent.com/u/1974742?v=3","gravatar_id":"","url":"https://api.github.com/users/SwordYork","html_url":"https://github.com/SwordYork","followers_url":"https://api.github.com/users/SwordYork/followers","following_url":"https://api.github.com/users/SwordYork/following{/other_user}","gists_url":"https://api.github.com/users/SwordYork/gists{/gist_id}","starred_url":"https://api.github.com/users/SwordYork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SwordYork/subscriptions","organizations_url":"https://api.github.com/users/SwordYork/orgs","repos_url":"https://api.github.com/users/SwordYork/repos","events_url":"https://api.github.com/users/SwordYork/events{/privacy}","received_events_url":"https://api.github.com/users/SwordYork/received_events","type":"User","site_admin":false},"repo":{"id":58095969,"name":"blocks","full_name":"SwordYork/blocks","owner":{"login":"SwordYork","id":1974742,"avatar_url":"https://avatars.githubusercontent.com/u/1974742?v=3","gravatar_id":"","url":"https://api.github.com/users/SwordYork","html_url":"https://github.com/SwordYork","followers_url":"https://api.github.com/users/SwordYork/followers","following_url":"https://api.github.com/users/SwordYork/following{/other_user}","gists_url":"https://api.github.com/users/SwordYork/gists{/gist_id}","starred_url":"https://api.github.com/users/SwordYork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SwordYork/subscriptions","organizations_url":"https://api.github.com/users/SwordYork/orgs","repos_url":"https://api.github.com/users/SwordYork/repos","events_url":"https://api.github.com/users/SwordYork/events{/privacy}","received_events_url":"https://api.github.com/users/SwordYork/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SwordYork/blocks","description":"A Theano framework for building and training neural networks","fork":true,"url":"https://api.github.com/repos/SwordYork/blocks","forks_url":"https://api.github.com/repos/SwordYork/blocks/forks","keys_url":"https://api.github.com/repos/SwordYork/blocks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SwordYork/blocks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SwordYork/blocks/teams","hooks_url":"https://api.github.com/repos/SwordYork/blocks/hooks","issue_events_url":"https://api.github.com/repos/SwordYork/blocks/issues/events{/number}","events_url":"https://api.github.com/repos/SwordYork/blocks/events","assignees_url":"https://api.github.com/repos/SwordYork/blocks/assignees{/user}","branches_url":"https://api.github.com/repos/SwordYork/blocks/branches{/branch}","tags_url":"https://api.github.com/repos/SwordYork/blocks/tags","blobs_url":"https://api.github.com/repos/SwordYork/blocks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SwordYork/blocks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SwordYork/blocks/git/refs{/sha}","trees_url":"https://api.github.com/repos/SwordYork/blocks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SwordYork/blocks/statuses/{sha}","languages_url":"https://api.github.com/repos/SwordYork/blocks/languages","stargazers_url":"https://api.github.com/repos/SwordYork/blocks/stargazers","contributors_url":"https://api.github.com/repos/SwordYork/blocks/contributors","subscribers_url":"https://api.github.com/repos/SwordYork/blocks/subscribers","subscription_url":"https://api.github.com/repos/SwordYork/blocks/subscription","commits_url":"https://api.github.com/repos/SwordYork/blocks/commits{/sha}","git_commits_url":"https://api.github.com/repos/SwordYork/blocks/git/commits{/sha}","comments_url":"https://api.github.com/repos/SwordYork/blocks/comments{/number}","issue_comment_url":"https://api.github.com/repos/SwordYork/blocks/issues/comments{/number}","contents_url":"https://api.github.com/repos/SwordYork/blocks/contents/{+path}","compare_url":"https://api.github.com/repos/SwordYork/blocks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SwordYork/blocks/merges","archive_url":"https://api.github.com/repos/SwordYork/blocks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SwordYork/blocks/downloads","issues_url":"https://api.github.com/repos/SwordYork/blocks/issues{/number}","pulls_url":"https://api.github.com/repos/SwordYork/blocks/pulls{/number}","milestones_url":"https://api.github.com/repos/SwordYork/blocks/milestones{/number}","notifications_url":"https://api.github.com/repos/SwordYork/blocks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SwordYork/blocks/labels{/name}","releases_url":"https://api.github.com/repos/SwordYork/blocks/releases{/id}","deployments_url":"https://api.github.com/repos/SwordYork/blocks/deployments","created_at":"2016-05-05T01:43:31Z","updated_at":"2016-05-05T01:43:32Z","pushed_at":"2016-05-05T04:04:58Z","git_url":"git://github.com/SwordYork/blocks.git","ssh_url":"git@github.com:SwordYork/blocks.git","clone_url":"https://github.com/SwordYork/blocks.git","svn_url":"https://github.com/SwordYork/blocks","homepage":"","size":4360,"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":"mila-udem:master","ref":"master","sha":"dba9741ed23991a5ffa218d3db2636d22cb0b77d","user":{"login":"mila-udem","id":11724251,"avatar_url":"https://avatars.githubusercontent.com/u/11724251?v=3","gravatar_id":"","url":"https://api.github.com/users/mila-udem","html_url":"https://github.com/mila-udem","followers_url":"https://api.github.com/users/mila-udem/followers","following_url":"https://api.github.com/users/mila-udem/following{/other_user}","gists_url":"https://api.github.com/users/mila-udem/gists{/gist_id}","starred_url":"https://api.github.com/users/mila-udem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mila-udem/subscriptions","organizations_url":"https://api.github.com/users/mila-udem/orgs","repos_url":"https://api.github.com/users/mila-udem/repos","events_url":"https://api.github.com/users/mila-udem/events{/privacy}","received_events_url":"https://api.github.com/users/mila-udem/received_events","type":"Organization","site_admin":false},"repo":{"id":24829371,"name":"blocks","full_name":"mila-udem/blocks","owner":{"login":"mila-udem","id":11724251,"avatar_url":"https://avatars.githubusercontent.com/u/11724251?v=3","gravatar_id":"","url":"https://api.github.com/users/mila-udem","html_url":"https://github.com/mila-udem","followers_url":"https://api.github.com/users/mila-udem/followers","following_url":"https://api.github.com/users/mila-udem/following{/other_user}","gists_url":"https://api.github.com/users/mila-udem/gists{/gist_id}","starred_url":"https://api.github.com/users/mila-udem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mila-udem/subscriptions","organizations_url":"https://api.github.com/users/mila-udem/orgs","repos_url":"https://api.github.com/users/mila-udem/repos","events_url":"https://api.github.com/users/mila-udem/events{/privacy}","received_events_url":"https://api.github.com/users/mila-udem/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mila-udem/blocks","description":"A Theano framework for building and training neural networks","fork":false,"url":"https://api.github.com/repos/mila-udem/blocks","forks_url":"https://api.github.com/repos/mila-udem/blocks/forks","keys_url":"https://api.github.com/repos/mila-udem/blocks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mila-udem/blocks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mila-udem/blocks/teams","hooks_url":"https://api.github.com/repos/mila-udem/blocks/hooks","issue_events_url":"https://api.github.com/repos/mila-udem/blocks/issues/events{/number}","events_url":"https://api.github.com/repos/mila-udem/blocks/events","assignees_url":"https://api.github.com/repos/mila-udem/blocks/assignees{/user}","branches_url":"https://api.github.com/repos/mila-udem/blocks/branches{/branch}","tags_url":"https://api.github.com/repos/mila-udem/blocks/tags","blobs_url":"https://api.github.com/repos/mila-udem/blocks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mila-udem/blocks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mila-udem/blocks/git/refs{/sha}","trees_url":"https://api.github.com/repos/mila-udem/blocks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mila-udem/blocks/statuses/{sha}","languages_url":"https://api.github.com/repos/mila-udem/blocks/languages","stargazers_url":"https://api.github.com/repos/mila-udem/blocks/stargazers","contributors_url":"https://api.github.com/repos/mila-udem/blocks/contributors","subscribers_url":"https://api.github.com/repos/mila-udem/blocks/subscribers","subscription_url":"https://api.github.com/repos/mila-udem/blocks/subscription","commits_url":"https://api.github.com/repos/mila-udem/blocks/commits{/sha}","git_commits_url":"https://api.github.com/repos/mila-udem/blocks/git/commits{/sha}","comments_url":"https://api.github.com/repos/mila-udem/blocks/comments{/number}","issue_comment_url":"https://api.github.com/repos/mila-udem/blocks/issues/comments{/number}","contents_url":"https://api.github.com/repos/mila-udem/blocks/contents/{+path}","compare_url":"https://api.github.com/repos/mila-udem/blocks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mila-udem/blocks/merges","archive_url":"https://api.github.com/repos/mila-udem/blocks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mila-udem/blocks/downloads","issues_url":"https://api.github.com/repos/mila-udem/blocks/issues{/number}","pulls_url":"https://api.github.com/repos/mila-udem/blocks/pulls{/number}","milestones_url":"https://api.github.com/repos/mila-udem/blocks/milestones{/number}","notifications_url":"https://api.github.com/repos/mila-udem/blocks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mila-udem/blocks/labels{/name}","releases_url":"https://api.github.com/repos/mila-udem/blocks/releases{/id}","deployments_url":"https://api.github.com/repos/mila-udem/blocks/deployments","created_at":"2014-10-06T00:08:32Z","updated_at":"2016-05-06T00:19:36Z","pushed_at":"2016-05-05T06:27:23Z","git_url":"git://github.com/mila-udem/blocks.git","ssh_url":"git@github.com:mila-udem/blocks.git","clone_url":"https://github.com/mila-udem/blocks.git","svn_url":"https://github.com/mila-udem/blocks","homepage":"","size":25939,"stargazers_count":786,"watchers_count":786,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":232,"mirror_url":null,"open_issues_count":177,"forks":232,"open_issues":177,"watchers":786,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mila-udem/blocks/pulls/1078"},"html":{"href":"https://github.com/mila-udem/blocks/pull/1078"},"issue":{"href":"https://api.github.com/repos/mila-udem/blocks/issues/1078"},"comments":{"href":"https://api.github.com/repos/mila-udem/blocks/issues/1078/comments"},"review_comments":{"href":"https://api.github.com/repos/mila-udem/blocks/pulls/1078/comments"},"review_comment":{"href":"https://api.github.com/repos/mila-udem/blocks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mila-udem/blocks/pulls/1078/commits"},"statuses":{"href":"https://api.github.com/repos/mila-udem/blocks/statuses/4fbde838c1db3c683089b896a646e6fa02f3760d"}}}}