diff options
author | Ethan Furman <ethan@stoneleaf.us> | 2016-09-11 20:34:42 (GMT) |
---|---|---|
committer | Ethan Furman <ethan@stoneleaf.us> | 2016-09-11 20:34:42 (GMT) |
commit | 40bed8a536770551b2a6b3ad58278cc623722b72 (patch) | |
tree | 5c74f58f7222e8edeaeb9d4f22db3d631bd39622 | |
parent | f93395bc5125c99539597bf134ca8bcf9707655b (diff) | |
download | cpython-40bed8a536770551b2a6b3ad58278cc623722b72.zip cpython-40bed8a536770551b2a6b3ad58278cc623722b72.tar.gz cpython-40bed8a536770551b2a6b3ad58278cc623722b72.tar.bz2 |
issue28083: add IntFlag constants
-rw-r--r-- | Lib/socket.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Lib/socket.py b/Lib/socket.py index 6dddfe1..bc8f467 100644 --- a/Lib/socket.py +++ b/Lib/socket.py @@ -50,7 +50,7 @@ import _socket from _socket import * import os, sys, io, selectors -from enum import IntEnum +from enum import IntEnum, IntFlag try: import errno @@ -80,6 +80,16 @@ IntEnum._convert( __name__, lambda C: C.isupper() and C.startswith('SOCK_')) +IntFlag._convert( + 'MsgFlag', + __name__, + lambda C: C.isupper() and C.startswith('MSG_')) + +IntFlag._convert( + 'AddressInfo', + __name__, + lambda C: C.isupper() and C.startswith('AI_')) + _LOCALHOST = '127.0.0.1' _LOCALHOST_V6 = '::1' |