{"action":"created","issue":{"url":"https://api.github.com/repos/micropython/micropython/issues/1852","repository_url":"https://api.github.com/repos/micropython/micropython","labels_url":"https://api.github.com/repos/micropython/micropython/issues/1852/labels{/name}","comments_url":"https://api.github.com/repos/micropython/micropython/issues/1852/comments","events_url":"https://api.github.com/repos/micropython/micropython/issues/1852/events","html_url":"https://github.com/micropython/micropython/issues/1852","id":134274698,"number":1852,"title":"objrange: No check for zero step in range() function.","user":{"login":"hosaka","id":171876,"avatar_url":"https://avatars.githubusercontent.com/u/171876?v=3","gravatar_id":"","url":"https://api.github.com/users/hosaka","html_url":"https://github.com/hosaka","followers_url":"https://api.github.com/users/hosaka/followers","following_url":"https://api.github.com/users/hosaka/following{/other_user}","gists_url":"https://api.github.com/users/hosaka/gists{/gist_id}","starred_url":"https://api.github.com/users/hosaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hosaka/subscriptions","organizations_url":"https://api.github.com/users/hosaka/orgs","repos_url":"https://api.github.com/users/hosaka/repos","events_url":"https://api.github.com/users/hosaka/events{/privacy}","received_events_url":"https://api.github.com/users/hosaka/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-02-17T13:06:34Z","updated_at":"2016-02-26T21:51:32Z","closed_at":"2016-02-26T21:51:32Z","body":"While attempting to follow previously raised #1711 and #1481.\r\n```python\r\n>>> for i in range(0, 10, 0):\r\n...     print(i)\r\n...  \r\n```\r\nWill cause an infinite loop, printing 1 until ctrl-c is sent. While cpython prints:\r\n```\r\nValueError: range() arg 3 must not be zero\r\n```\r\nThere is actually a TODO note in [objrange.c#L107](https://github.com/micropython/micropython/blob/master/py/objrange.c#L107). Since the patch is tiny, I will probably include it while working on negative and zero step slicing issues, unless there will be other recommendations."},"comment":{"url":"https://api.github.com/repos/micropython/micropython/issues/comments/189495288","html_url":"https://github.com/micropython/micropython/issues/1852#issuecomment-189495288","issue_url":"https://api.github.com/repos/micropython/micropython/issues/1852","id":189495288,"user":{"login":"hosaka","id":171876,"avatar_url":"https://avatars.githubusercontent.com/u/171876?v=3","gravatar_id":"","url":"https://api.github.com/users/hosaka","html_url":"https://github.com/hosaka","followers_url":"https://api.github.com/users/hosaka/followers","following_url":"https://api.github.com/users/hosaka/following{/other_user}","gists_url":"https://api.github.com/users/hosaka/gists{/gist_id}","starred_url":"https://api.github.com/users/hosaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hosaka/subscriptions","organizations_url":"https://api.github.com/users/hosaka/orgs","repos_url":"https://api.github.com/users/hosaka/repos","events_url":"https://api.github.com/users/hosaka/events{/privacy}","received_events_url":"https://api.github.com/users/hosaka/received_events","type":"User","site_admin":false},"created_at":"2016-02-26T21:51:32Z","updated_at":"2016-02-26T21:51:32Z","body":"Closing this as non-issue."}}