(descriptor)
return result
Python-specific helper to access "extra" field of descriptors,
    because it's not as straight-forward as in C.
    Returns a list, where each entry is an individual extra descriptor.
Python-specific helper to access "extra" field of descriptors,
    because it's not as straight-forward as in C.
    Returns a list, where each entry is an individual extra descriptor.
Python - specific helper to access extra field of descriptors because it s not as straight - forward as in C . Returns a list where each entry is an individual extra descriptor .
def get_extra(descriptor):
    """
    Python-specific helper to access "extra" field of descriptors,
    because it's not as straight-forward as in C.
    Returns a list, where each entry is an individual extra descriptor.
    """
    result = []
    extra_length = descriptor.extra_length
    if extra_length:
        extra = string_at(descriptor.extra, extra_length)
        append = result.append
        while extra:
            length = _string_item_to_int(extra[0])
            if not (0 < length <= len(extra)):
                raise ValueError('Extra descriptor %i is incomplete/invalid' % (
                    len(result), ))
            append(extra[:length])
            extra = extra[length:]
    return result
def get_extra ( descriptor ) : result = [ ] extra_length = descriptor . extra_length if extra_length : extra = string_at ( descriptor . extra , extra_length ) append = result . append while extra : length = _string_item_to_int ( extra [ 0 ] ) if not ( 0 < length <= len ( extra ) ) : raise ValueError ( 'Extra descriptor %i is incomplete/invalid' % ( len ( result ) , ) ) append ( extra [ : length ] ) extra = extra [ length : ] return result