_paramcheck.py 文件源码

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

项目:python-ioctl 作者: olavmrk 项目源码 文件源码
def check_ctypes_datatype(datatype):
    valid_datatypes = (
        ctypes._SimpleCData,
        ctypes.Union,
        ctypes.BigEndianStructure,
        ctypes.LittleEndianStructure,
        ctypes.Structure,
        )
    for t in valid_datatypes:
        if issubclass(datatype, t):
            return
    raise TypeError('datatype must be a ctypes data type, but was {}'.format(datatype.__name__))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号