{"action":"created","issue":{"url":"https://api.github.com/repos/brian-team/brian2/issues/600","repository_url":"https://api.github.com/repos/brian-team/brian2","labels_url":"https://api.github.com/repos/brian-team/brian2/issues/600/labels{/name}","comments_url":"https://api.github.com/repos/brian-team/brian2/issues/600/comments","events_url":"https://api.github.com/repos/brian-team/brian2/issues/600/events","html_url":"https://github.com/brian-team/brian2/pull/600","id":118722608,"number":600,"title":"[MRG] Efficient synapse creation","user":{"login":"thesamovar","id":2903870,"avatar_url":"https://avatars.githubusercontent.com/u/2903870?v=3","gravatar_id":"","url":"https://api.github.com/users/thesamovar","html_url":"https://github.com/thesamovar","followers_url":"https://api.github.com/users/thesamovar/followers","following_url":"https://api.github.com/users/thesamovar/following{/other_user}","gists_url":"https://api.github.com/users/thesamovar/gists{/gist_id}","starred_url":"https://api.github.com/users/thesamovar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thesamovar/subscriptions","organizations_url":"https://api.github.com/users/thesamovar/orgs","repos_url":"https://api.github.com/users/thesamovar/repos","events_url":"https://api.github.com/users/thesamovar/events{/privacy}","received_events_url":"https://api.github.com/users/thesamovar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/brian-team/brian2/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":155,"created_at":"2015-11-24T23:03:53Z","updated_at":"2016-04-08T14:24:16Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/brian-team/brian2/pulls/600","html_url":"https://github.com/brian-team/brian2/pull/600","diff_url":"https://github.com/brian-team/brian2/pull/600.diff","patch_url":"https://github.com/brian-team/brian2/pull/600.patch"},"body":"This branch is for work on issue #65."},"comment":{"url":"https://api.github.com/repos/brian-team/brian2/issues/comments/207451381","html_url":"https://github.com/brian-team/brian2/pull/600#issuecomment-207451381","issue_url":"https://api.github.com/repos/brian-team/brian2/issues/600","id":207451381,"user":{"login":"mstimberg","id":1381982,"avatar_url":"https://avatars.githubusercontent.com/u/1381982?v=3","gravatar_id":"","url":"https://api.github.com/users/mstimberg","html_url":"https://github.com/mstimberg","followers_url":"https://api.github.com/users/mstimberg/followers","following_url":"https://api.github.com/users/mstimberg/following{/other_user}","gists_url":"https://api.github.com/users/mstimberg/gists{/gist_id}","starred_url":"https://api.github.com/users/mstimberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mstimberg/subscriptions","organizations_url":"https://api.github.com/users/mstimberg/orgs","repos_url":"https://api.github.com/users/mstimberg/repos","events_url":"https://api.github.com/users/mstimberg/events{/privacy}","received_events_url":"https://api.github.com/users/mstimberg/received_events","type":"User","site_admin":false},"created_at":"2016-04-08T14:24:16Z","updated_at":"2016-04-08T14:24:16Z","body":"I think in the interest in getting the release out and that this is something non-trivial to get right, let's not care about this for now but only add a note to the documentation (where it explains the loop). Some of the problem will go away when we allow for the opposite generator syntax, i.e. `i='...'` (which should be quite straightforward, `i`, `j`, etc. just have to be replaceable parts of the template). Also, even if not very intuitive, my example can be translated into something safe, I think:\r\n```Python\r\ni+1 for _ in sample(1*int(i<N_post-1), p=0.5)\r\n```"}}