Vertical line in function arguments

Andrej Mitrovic andrej.mitrovich at gmail.com
Sat Mar 27 15:29:39 EDT 2010


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?



More information about the Python-list mailing list