{"action":"created","issue":{"url":"https://api.github.com/repos/mmontone/djula/issues/16","labels_url":"https://api.github.com/repos/mmontone/djula/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/mmontone/djula/issues/16/comments","events_url":"https://api.github.com/repos/mmontone/djula/issues/16/events","html_url":"https://github.com/mmontone/djula/issues/16","id":105276918,"number":16,"title":"Provide an iteration protocol","user":{"login":"PuercoPop","id":387111,"avatar_url":"https://avatars.githubusercontent.com/u/387111?v=3","gravatar_id":"","url":"https://api.github.com/users/PuercoPop","html_url":"https://github.com/PuercoPop","followers_url":"https://api.github.com/users/PuercoPop/followers","following_url":"https://api.github.com/users/PuercoPop/following{/other_user}","gists_url":"https://api.github.com/users/PuercoPop/gists{/gist_id}","starred_url":"https://api.github.com/users/PuercoPop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PuercoPop/subscriptions","organizations_url":"https://api.github.com/users/PuercoPop/orgs","repos_url":"https://api.github.com/users/PuercoPop/repos","events_url":"https://api.github.com/users/PuercoPop/events{/privacy}","received_events_url":"https://api.github.com/users/PuercoPop/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mmontone/djula/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-07T23:31:57Z","updated_at":"2015-09-18T14:05:31Z","closed_at":null,"body":"Currently the [iterables](https://github.com/mmontone/djula/blob/master/src/tags.lisp#L275) are a 'closed abstraction'. An iterator protocol would allow the user to 'teach' the for tag how to iterate different the objects.\r\n\r\nI propose something similar to python iterators. a next generic function and a stop-iteration condition. An addition to consider would be that the iterator knows how many values per iteration it provides. Although just using values could be a better choice.\r\n\r\nIdeally this would help to break up the implementation of :parsed-for which is currently too large.\r\n\r\nIs this extension desirable?"},"comment":{"url":"https://api.github.com/repos/mmontone/djula/issues/comments/141460129","html_url":"https://github.com/mmontone/djula/issues/16#issuecomment-141460129","issue_url":"https://api.github.com/repos/mmontone/djula/issues/16","id":141460129,"user":{"login":"PuercoPop","id":387111,"avatar_url":"https://avatars.githubusercontent.com/u/387111?v=3","gravatar_id":"","url":"https://api.github.com/users/PuercoPop","html_url":"https://github.com/PuercoPop","followers_url":"https://api.github.com/users/PuercoPop/followers","following_url":"https://api.github.com/users/PuercoPop/following{/other_user}","gists_url":"https://api.github.com/users/PuercoPop/gists{/gist_id}","starred_url":"https://api.github.com/users/PuercoPop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PuercoPop/subscriptions","organizations_url":"https://api.github.com/users/PuercoPop/orgs","repos_url":"https://api.github.com/users/PuercoPop/repos","events_url":"https://api.github.com/users/PuercoPop/events{/privacy}","received_events_url":"https://api.github.com/users/PuercoPop/received_events","type":"User","site_admin":false},"created_at":"2015-09-18T14:05:31Z","updated_at":"2015-09-18T14:05:31Z","body":"It looks promising!"}}