issue28083: add IntFlag constants
This commit is contained in:
parent
f93395bc51
commit
40bed8a536
|
@ -50,7 +50,7 @@ import _socket
|
||||||
from _socket import *
|
from _socket import *
|
||||||
|
|
||||||
import os, sys, io, selectors
|
import os, sys, io, selectors
|
||||||
from enum import IntEnum
|
from enum import IntEnum, IntFlag
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import errno
|
import errno
|
||||||
|
@ -80,6 +80,16 @@ IntEnum._convert(
|
||||||
__name__,
|
__name__,
|
||||||
lambda C: C.isupper() and C.startswith('SOCK_'))
|
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 = '127.0.0.1'
|
||||||
_LOCALHOST_V6 = '::1'
|
_LOCALHOST_V6 = '::1'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue