payload: {"action":"created","issue":{"url":"https://api.github.com/repos/Origen-SDK/o2/issues/23","repository_url":"https://api.github.com/repos/Origen-SDK/o2","labels_url":"https://api.github.com/repos/Origen-SDK/o2/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/Origen-SDK/o2/issues/23/comments","events_url":"https://api.github.com/repos/Origen-SDK/o2/issues/23/events","html_url":"https://github.com/Origen-SDK/o2/issues/23","id":536296651,"node_id":"MDU6SXNzdWU1MzYyOTY2NTE=","number":23,"title":"Bang method equivalents","user":{"login":"ginty","id":158364,"node_id":"MDQ6VXNlcjE1ODM2NA==","avatar_url":"https://avatars3.githubusercontent.com/u/158364?v=4","gravatar_id":"","url":"https://api.github.com/users/ginty","html_url":"https://github.com/ginty","followers_url":"https://api.github.com/users/ginty/followers","following_url":"https://api.github.com/users/ginty/following{/other_user}","gists_url":"https://api.github.com/users/ginty/gists{/gist_id}","starred_url":"https://api.github.com/users/ginty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ginty/subscriptions","organizations_url":"https://api.github.com/users/ginty/orgs","repos_url":"https://api.github.com/users/ginty/repos","events_url":"https://api.github.com/users/ginty/events{/privacy}","received_events_url":"https://api.github.com/users/ginty/received_events","type":"User","site_admin":false},"labels":[{"id":1723364186,"node_id":"MDU6TGFiZWwxNzIzMzY0MTg2","url":"https://api.github.com/repos/Origen-SDK/o2/labels/feature%20discussion","name":"feature discussion","color":"fcb6b5","default":false,"description":"Discussion on a feature's requirements or implementation"}],"state":"open","locked":false,"assignee":{"login":"ginty","id":158364,"node_id":"MDQ6VXNlcjE1ODM2NA==","avatar_url":"https://avatars3.githubusercontent.com/u/158364?v=4","gravatar_id":"","url":"https://api.github.com/users/ginty","html_url":"https://github.com/ginty","followers_url":"https://api.github.com/users/ginty/followers","following_url":"https://api.github.com/users/ginty/following{/other_user}","gists_url":"https://api.github.com/users/ginty/gists{/gist_id}","starred_url":"https://api.github.com/users/ginty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ginty/subscriptions","organizations_url":"https://api.github.com/users/ginty/orgs","repos_url":"https://api.github.com/users/ginty/repos","events_url":"https://api.github.com/users/ginty/events{/privacy}","received_events_url":"https://api.github.com/users/ginty/received_events","type":"User","site_admin":false},"assignees":[{"login":"ginty","id":158364,"node_id":"MDQ6VXNlcjE1ODM2NA==","avatar_url":"https://avatars3.githubusercontent.com/u/158364?v=4","gravatar_id":"","url":"https://api.github.com/users/ginty","html_url":"https://github.com/ginty","followers_url":"https://api.github.com/users/ginty/followers","following_url":"https://api.github.com/users/ginty/following{/other_user}","gists_url":"https://api.github.com/users/ginty/gists{/gist_id}","starred_url":"https://api.github.com/users/ginty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ginty/subscriptions","organizations_url":"https://api.github.com/users/ginty/orgs","repos_url":"https://api.github.com/users/ginty/repos","events_url":"https://api.github.com/users/ginty/events{/privacy}","received_events_url":"https://api.github.com/users/ginty/received_events","type":"User","site_admin":false},{"login":"priyavadan","id":3895377,"node_id":"MDQ6VXNlcjM4OTUzNzc=","avatar_url":"https://avatars0.githubusercontent.com/u/3895377?v=4","gravatar_id":"","url":"https://api.github.com/users/priyavadan","html_url":"https://github.com/priyavadan","followers_url":"https://api.github.com/users/priyavadan/followers","following_url":"https://api.github.com/users/priyavadan/following{/other_user}","gists_url":"https://api.github.com/users/priyavadan/gists{/gist_id}","starred_url":"https://api.github.com/users/priyavadan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/priyavadan/subscriptions","organizations_url":"https://api.github.com/users/priyavadan/orgs","repos_url":"https://api.github.com/users/priyavadan/repos","events_url":"https://api.github.com/users/priyavadan/events{/privacy}","received_events_url":"https://api.github.com/users/priyavadan/received_events","type":"User","site_admin":false},{"login":"redxeth","id":5686085,"node_id":"MDQ6VXNlcjU2ODYwODU=","avatar_url":"https://avatars0.githubusercontent.com/u/5686085?v=4","gravatar_id":"","url":"https://api.github.com/users/redxeth","html_url":"https://github.com/redxeth","followers_url":"https://api.github.com/users/redxeth/followers","following_url":"https://api.github.com/users/redxeth/following{/other_user}","gists_url":"https://api.github.com/users/redxeth/gists{/gist_id}","starred_url":"https://api.github.com/users/redxeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redxeth/subscriptions","organizations_url":"https://api.github.com/users/redxeth/orgs","repos_url":"https://api.github.com/users/redxeth/repos","events_url":"https://api.github.com/users/redxeth/events{/privacy}","received_events_url":"https://api.github.com/users/redxeth/received_events","type":"User","site_admin":false},{"login":"rlaj","id":6031480,"node_id":"MDQ6VXNlcjYwMzE0ODA=","avatar_url":"https://avatars1.githubusercontent.com/u/6031480?v=4","gravatar_id":"","url":"https://api.github.com/users/rlaj","html_url":"https://github.com/rlaj","followers_url":"https://api.github.com/users/rlaj/followers","following_url":"https://api.github.com/users/rlaj/following{/other_user}","gists_url":"https://api.github.com/users/rlaj/gists{/gist_id}","starred_url":"https://api.github.com/users/rlaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlaj/subscriptions","organizations_url":"https://api.github.com/users/rlaj/orgs","repos_url":"https://api.github.com/users/rlaj/repos","events_url":"https://api.github.com/users/rlaj/events{/privacy}","received_events_url":"https://api.github.com/users/rlaj/received_events","type":"User","site_admin":false},{"login":"chrisnappi","id":11947021,"node_id":"MDQ6VXNlcjExOTQ3MDIx","avatar_url":"https://avatars3.githubusercontent.com/u/11947021?v=4","gravatar_id":"","url":"https://api.github.com/users/chrisnappi","html_url":"https://github.com/chrisnappi","followers_url":"https://api.github.com/users/chrisnappi/followers","following_url":"https://api.github.com/users/chrisnappi/following{/other_user}","gists_url":"https://api.github.com/users/chrisnappi/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisnappi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisnappi/subscriptions","organizations_url":"https://api.github.com/users/chrisnappi/orgs","repos_url":"https://api.github.com/users/chrisnappi/repos","events_url":"https://api.github.com/users/chrisnappi/events{/privacy}","received_events_url":"https://api.github.com/users/chrisnappi/received_events","type":"User","site_admin":false},{"login":"coreyeng","id":13453967,"node_id":"MDQ6VXNlcjEzNDUzOTY3","avatar_url":"https://avatars2.githubusercontent.com/u/13453967?v=4","gravatar_id":"","url":"https://api.github.com/users/coreyeng","html_url":"https://github.com/coreyeng","followers_url":"https://api.github.com/users/coreyeng/followers","following_url":"https://api.github.com/users/coreyeng/following{/other_user}","gists_url":"https://api.github.com/users/coreyeng/gists{/gist_id}","starred_url":"https://api.github.com/users/coreyeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreyeng/subscriptions","organizations_url":"https://api.github.com/users/coreyeng/orgs","repos_url":"https://api.github.com/users/coreyeng/repos","events_url":"https://api.github.com/users/coreyeng/events{/privacy}","received_events_url":"https://api.github.com/users/coreyeng/received_events","type":"User","site_admin":false},{"login":"pderouen","id":17879450,"node_id":"MDQ6VXNlcjE3ODc5NDUw","avatar_url":"https://avatars2.githubusercontent.com/u/17879450?v=4","gravatar_id":"","url":"https://api.github.com/users/pderouen","html_url":"https://github.com/pderouen","followers_url":"https://api.github.com/users/pderouen/followers","following_url":"https://api.github.com/users/pderouen/following{/other_user}","gists_url":"https://api.github.com/users/pderouen/gists{/gist_id}","starred_url":"https://api.github.com/users/pderouen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pderouen/subscriptions","organizations_url":"https://api.github.com/users/pderouen/orgs","repos_url":"https://api.github.com/users/pderouen/repos","events_url":"https://api.github.com/users/pderouen/events{/privacy}","received_events_url":"https://api.github.com/users/pderouen/received_events","type":"User","site_admin":false},{"login":"info-rchitect","id":26782653,"node_id":"MDQ6VXNlcjI2NzgyNjUz","avatar_url":"https://avatars1.githubusercontent.com/u/26782653?v=4","gravatar_id":"","url":"https://api.github.com/users/info-rchitect","html_url":"https://github.com/info-rchitect","followers_url":"https://api.github.com/users/info-rchitect/followers","following_url":"https://api.github.com/users/info-rchitect/following{/other_user}","gists_url":"https://api.github.com/users/info-rchitect/gists{/gist_id}","starred_url":"https://api.github.com/users/info-rchitect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/info-rchitect/subscriptions","organizations_url":"https://api.github.com/users/info-rchitect/orgs","repos_url":"https://api.github.com/users/info-rchitect/repos","events_url":"https://api.github.com/users/info-rchitect/events{/privacy}","received_events_url":"https://api.github.com/users/info-rchitect/received_events","type":"User","site_admin":false},{"login":"arkohler","id":31351815,"node_id":"MDQ6VXNlcjMxMzUxODE1","avatar_url":"https://avatars0.githubusercontent.com/u/31351815?v=4","gravatar_id":"","url":"https://api.github.com/users/arkohler","html_url":"https://github.com/arkohler","followers_url":"https://api.github.com/users/arkohler/followers","following_url":"https://api.github.com/users/arkohler/following{/other_user}","gists_url":"https://api.github.com/users/arkohler/gists{/gist_id}","starred_url":"https://api.github.com/users/arkohler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arkohler/subscriptions","organizations_url":"https://api.github.com/users/arkohler/orgs","repos_url":"https://api.github.com/users/arkohler/repos","events_url":"https://api.github.com/users/arkohler/events{/privacy}","received_events_url":"https://api.github.com/users/arkohler/received_events","type":"User","site_admin":false}],"milestone":null,"comments":22,"created_at":"2019-12-11T11:01:56Z","updated_at":"2019-12-11T16:22:16Z","closed_at":null,"author_association":"MEMBER","body":"Python does not permit bangs (!) and similar symbols in method names, so the O1 convention of appending a bang to a method name to make it take action will not be possible in O2:\r\n\r\n~~~ruby\r\npin(\"tdi\").drive(1)    # Configure the pin to drive a 1, but don't apply it\r\npin(\"tdi\").drive!(1)   # Configure the pin to drive a 1 and apply it\r\n\r\nreg(\"blah\").write(0x1234)   # Write the value to the register, but don't apply it to the device\r\nreg(\"blah\").write!(0x1234)  # Write the value to the register and apply it to the device\r\n~~~\r\n\r\nHow should we handle this in O2 with consistency across all similar APIs?\r\n\r\nWhat about having it such that the APIs are not applied by default, then we have an `apply()` method:\r\n\r\n~~~python\r\npin(\"tdi\").drive(1) # Configure the pin to drive a 1, but don't apply it\r\npin(\"tdi\").apply()  # Apply the current state (which for a pin is equivalent to tester.cycle()\r\n\r\nreg(\"blah\").write(0x1234) # Write the value to the register, but don't apply it to the device\r\nreg(\"blah\").apply()\r\n~~~\r\n\r\nIt would be nice to also support a 1-liner I suppose, what about:\r\n\r\n~~~python\r\n# add _and_apply version of all methods:\r\npin(\"tdi\").drive_and_apply(1) \r\nreg(\"blah\").write_and_apply(0x1234)\r\n~~~\r\n\r\nor\r\n\r\n~~~python\r\n# Have all methods accept an optional apply argument last\r\npin(\"tdi\").drive(1, True) \r\nreg(\"blah\").write(0x1234, True)\r\n~~~\r\n\r\nThoughts?\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Origen-SDK/o2/issues/comments/564621317","html_url":"https://github.com/Origen-SDK/o2/issues/23#issuecomment-564621317","issue_url":"https://api.github.com/repos/Origen-SDK/o2/issues/23","id":564621317,"node_id":"MDEyOklzc3VlQ29tbWVudDU2NDYyMTMxNw==","user":{"login":"pderouen","id":17879450,"node_id":"MDQ6VXNlcjE3ODc5NDUw","avatar_url":"https://avatars2.githubusercontent.com/u/17879450?v=4","gravatar_id":"","url":"https://api.github.com/users/pderouen","html_url":"https://github.com/pderouen","followers_url":"https://api.github.com/users/pderouen/followers","following_url":"https://api.github.com/users/pderouen/following{/other_user}","gists_url":"https://api.github.com/users/pderouen/gists{/gist_id}","starred_url":"https://api.github.com/users/pderouen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pderouen/subscriptions","organizations_url":"https://api.github.com/users/pderouen/orgs","repos_url":"https://api.github.com/users/pderouen/repos","events_url":"https://api.github.com/users/pderouen/events{/privacy}","received_events_url":"https://api.github.com/users/pderouen/received_events","type":"User","site_admin":false},"created_at":"2019-12-11T16:22:15Z","updated_at":"2019-12-11T16:22:15Z","author_association":"MEMBER","body":"<code>apply()</code> could still be meaningful for pins if it is interpreted to mean advance 1 time unit. That's how we used the bang method."}}
other: {"actor":{"display_login":"pderouen"}}