-
-
Save dw/9f92b1da4aed5646335a37319a135d63 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def flags(names): | |
"""Return the result of ORing a set of (space separated) :py:mod:`termios` | |
module constants together.""" | |
return sum(getattr(termios, name) for name in names.split()) | |
def flags(names): | |
"""Return the result of ORing a set of (space separated) :py:mod:`termios` | |
module constants together.""" | |
n = 0 | |
for name in names.split(): | |
n |= getattr(termios, name) | |
return n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment