def change(self, fn, edge=edges.BOTH):
        """Allow for `@change` decorator"""

        def wrapped(pin):
            fn(self.value)

        GPIO.add_event_callback(self._pin, wrapped)
def change ( self , fn , edge = edges . BOTH ) : def wrapped ( pin ) : fn ( self . value ) GPIO . add_event_callback ( self . _pin , wrapped )
Allow for `@change` decorator