peterhinch / micropython-samples

Assorted code ideas, unofficial MP FAQ, plus index to my other repositories.
MIT License
442 stars 91 forks source link

Update event.py #12

Closed kevinkk525 closed 4 years ago

kevinkk525 commented 4 years ago

Increase CPython compatibility by using a boolean value for the state. Compatibility also achieveable by only changing is_set() to "return self.state==1" so it returns a boolean. self.state should never be accessed directly from the outside so could stay an integer.