def read_content_types(archive):
 xml_source = archive.read(ARC_CONTENT_TYPES)
 root = fromstring(xml_source)
 contents_root = root.findall(('{%s}Override' % CONTYPES_NS))
 for type in contents_root:
  (yield (type.get('ContentType'), type.get('PartName')))

def read_content_types ( archive ) : xml_source = archive . read ( ARC_CONTENT_TYPES ) root = fromstring ( xml_source ) contents_root = root . findall ( ( '{%s}Override' % CONTYPES_NS ) ) for type in contents_root : ( yield ( type . get ( 'ContentType' ) , type . get ( 'PartName' ) ) )
read content types .