{"action":"created","issue":{"url":"https://api.github.com/repos/RPi-Distro/python-gpiozero/issues/460","repository_url":"https://api.github.com/repos/RPi-Distro/python-gpiozero","labels_url":"https://api.github.com/repos/RPi-Distro/python-gpiozero/issues/460/labels{/name}","comments_url":"https://api.github.com/repos/RPi-Distro/python-gpiozero/issues/460/comments","events_url":"https://api.github.com/repos/RPi-Distro/python-gpiozero/issues/460/events","html_url":"https://github.com/RPi-Distro/python-gpiozero/pull/460","id":178379451,"number":460,"title":"Add a new alternating_values SourceTool","user":{"login":"lurch","id":476186,"avatar_url":"https://avatars.githubusercontent.com/u/476186?v=3","gravatar_id":"","url":"https://api.github.com/users/lurch","html_url":"https://github.com/lurch","followers_url":"https://api.github.com/users/lurch/followers","following_url":"https://api.github.com/users/lurch/following{/other_user}","gists_url":"https://api.github.com/users/lurch/gists{/gist_id}","starred_url":"https://api.github.com/users/lurch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lurch/subscriptions","organizations_url":"https://api.github.com/users/lurch/orgs","repos_url":"https://api.github.com/users/lurch/repos","events_url":"https://api.github.com/users/lurch/events{/privacy}","received_events_url":"https://api.github.com/users/lurch/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/RPi-Distro/python-gpiozero/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-09-21T15:21:42Z","updated_at":"2016-09-21T15:37:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/RPi-Distro/python-gpiozero/pulls/460","html_url":"https://github.com/RPi-Distro/python-gpiozero/pull/460","diff_url":"https://github.com/RPi-Distro/python-gpiozero/pull/460.diff","patch_url":"https://github.com/RPi-Distro/python-gpiozero/pull/460.patch"},"body":"Another way of implementing this would be:\r\n```python\r\ndef alternating_values(initial_value=False):\r\n    return cycle([initial_value == True, initial_value == False])\r\n```\r\nbut I think the version in this PR is a bit more readable ;-)"},"comment":{"url":"https://api.github.com/repos/RPi-Distro/python-gpiozero/issues/comments/248651133","html_url":"https://github.com/RPi-Distro/python-gpiozero/pull/460#issuecomment-248651133","issue_url":"https://api.github.com/repos/RPi-Distro/python-gpiozero/issues/460","id":248651133,"user":{"login":"lurch","id":476186,"avatar_url":"https://avatars.githubusercontent.com/u/476186?v=3","gravatar_id":"","url":"https://api.github.com/users/lurch","html_url":"https://github.com/lurch","followers_url":"https://api.github.com/users/lurch/followers","following_url":"https://api.github.com/users/lurch/following{/other_user}","gists_url":"https://api.github.com/users/lurch/gists{/gist_id}","starred_url":"https://api.github.com/users/lurch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lurch/subscriptions","organizations_url":"https://api.github.com/users/lurch/orgs","repos_url":"https://api.github.com/users/lurch/repos","events_url":"https://api.github.com/users/lurch/events{/privacy}","received_events_url":"https://api.github.com/users/lurch/received_events","type":"User","site_admin":false},"created_at":"2016-09-21T15:37:43Z","updated_at":"2016-09-21T15:37:43Z","body":"That's exactly what http://gpiozero.readthedocs.io/en/latest/api_tools.html#gpiozero.tools.booleanized is for ;-)"}}
{"actor":{"display_login":"lurch"}}