This block could technically be written as just `int( bool( val ) )` for simplicity, or even just `res = self.rpc(42, 0x0E, bool( val ) )` and rpc should do the right thing by implicitly converting it to a 0 or 1.