From: Andrej Mitrovic on 27 Mar 2010 15:29 There is this peace of code in a 3rd party module: MidiIn.SetFilter(pypm.FILT_ACTIVE | pypm.FILT_CLOCK | pypm.FILT_PITCHBEND | pypm.FILT_NOTE) What are the vertical lines in a function call such as this? This actually calls a function from a Pyrex module that was compiled into a .pyd. Those filters are hex constants, but I've no idea what these vertical lines mean. Is this some form of binary "or" operation?
From: Andrej Mitrovic on 27 Mar 2010 15:30 Well I hate it when this happens. I ask a question, and literally 2 seconds later I bump into the answer. This explains it a bit: http://docs.python.org/library/stdtypes.html#bit-string-operations-on-integer-types
|
Pages: 1 Prev: Ipython(x,y) Won't Run Next: Python Psycopg2 - Interface Error : Connection already closed |