(field_name_list)
return result
Create a ctype structure class based on USB standard field naming
    (type-prefixed).
Create a ctype structure class based on USB standard field naming
    (type-prefixed).
Create a ctype structure class based on USB standard field naming ( type - prefixed ) .
def newStruct(field_name_list):
    """
    Create a ctype structure class based on USB standard field naming
    (type-prefixed).
    """
    field_list = []
    append = field_list.append
    for field in field_name_list:
        type_prefix = ''
        for char in field:
            if not char.islower():
                break
            type_prefix += char
        append((field, _desc_type_dict[type_prefix]))
    result = type('some_descriptor', (LittleEndianStructure, ), {})
    # Not using type()'s 3rd param to initialise class, as per ctypes
    # documentation:
    #   _pack_ must already be defined when _fields_ is assigned, otherwise it
    #   will have no effect.
    result._pack_ = 1
    result._fields_ = field_list
    return result
def newStruct ( field_name_list ) : field_list = [ ] append = field_list . append for field in field_name_list : type_prefix = '' for char in field : if not char . islower ( ) : break type_prefix += char append ( ( field , _desc_type_dict [ type_prefix ] ) ) result = type ( 'some_descriptor' , ( LittleEndianStructure , ) , { } ) # Not using type()'s 3rd param to initialise class, as per ctypes # documentation: #   _pack_ must already be defined when _fields_ is assigned, otherwise it #   will have no effect. result . _pack_ = 1 result . _fields_ = field_list return result