From: Ethan Furman Date: Sun, 11 Sep 2016 20:34:42 +0000 (-0700) Subject: issue28083: add IntFlag constants X-Git-Tag: v3.6.0b1~30 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=40bed8a536770551b2a6b3ad58278cc623722b72;p=thirdparty%2FPython%2Fcpython.git issue28083: add IntFlag constants --- diff --git a/Lib/socket.py b/Lib/socket.py index 6dddfe1d34b5..bc8f4671c99b 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'