I'd agree with Dave on the idea of pin.value() replacing the read and pin.value(n) replacing the read/write, just like the wiki describes. The name is clear and intuitive for both cases. Setting/getting the value with pin() might be an unnecessary convenience.
Also would agree with a pin.toggle() method, it is frequently used, easy to read and very obvious even to someone who doesn't know that it's equivalent to pin.value(n). Both pin.high() and pin.low() would logically go with pin.toggle(), but I'm more reluctant to those. The argument for this is: if you don't know the current value of the pin somewhere in the code, you have to:
Code: Select all
if pin is high:
pin is low
else:
pin is high
which could be simplified to pin.toggle(). Where pin.high() and pin.low() are replaced with pin.value(1) and pin.value(0), not a big trade off. The same goes for pin.intput()/output() both of those are replaces with one line that has 8 extra characters to type. But maybe I'm too biased towards everything bare minimum.