[Microbit-Python] Musical silliness...

Larry Hastings larry at hastings.org
Thu Oct 15 13:22:59 CEST 2015



On 10/15/2015 12:54 AM, Nicholas H.Tollervey wrote:
> * Specification of the pin is done via a named parameter called "pin"
> that has the default value of microbit.pin0.
> * music.tune should be renamed to music.play
>
> So we get code like this:
>
>>>> from microbit import music
>>>> music.play(music.NYAN)
>>>> import microbit
>>>> music.note('c4:4', pin=microbit.pin1)
>

LGTM.  I appreciate your open-mindedness!  I was worried I was 
resurrecting an old talked-to-death topic that only you still had the 
stamina to argue about.  ;-)

One tiny bit of bikeshedding.  "output=" instead of "pin=" for the named 
parameter?  Yes?  No?  Just a thought, I'm not wedded to it.

Cheers,


//arry/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/mailman/private/microbit/attachments/20151015/381bf103/attachment.html>


More information about the Microbit mailing list