problems with midi programming in python

Simon Forman rogue_pedro at yahoo.com
Wed Jul 5 21:23:59 EDT 2006


Not related to your actual question, but note:

>       if len(result) == 0:

empty lists test as False, so this can just be

>       if not result:



and

>           result[len(result)-1] -= 128

you can index lists with negative ints, backwards from the end of the
list, so this can be

>           result[-1] -= 128


Those are two of my favorite things about python.  :-)


Peace,
~Simon




More information about the Python-list mailing list