def track_description_list(head):
 r = []
 if head:
  item = head
  while item:
   item = item.contents
   r.append((item.id, item.name))
   item = item.next
  try:
   libvlc_track_description_release(head)
  except NameError:
   libvlc_track_description_list_release(head)
 return r

def track_description_list ( head ) : r = [ ] if head : item = head while item : item = item . contents r . append ( ( item . id , item . name ) ) item = item . next try : libvlc_track_description_release ( head ) except NameError : libvlc_track_description_list_release ( head ) return r
convert a trackdescription linked list to a python list .