_common.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:ropi 作者: ThumbGen 项目源码 文件源码
def socktype_to_enum(num):
    """Convert a numeric socket type value to an IntEnum member.
    If it's not a known member, return the numeric value itself.
    """
    if enum is None:
        return num
    try:
        return socket.AddressType(num)
    except (ValueError, AttributeError):
        return num


# --- Process.connections() 'kind' parameter mapping
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号