3 [@s$dZdZddZddZddZdS) z7Compute a resolution order for an object and its bases ZrestructuredtextcCsLi}g}x>t|D]2}x,t|D] }||kr d||<|jd|q WqW|S)aMerge multiple orderings so that within-ordering order is preserved Orderings are constrained in such a way that if an object appears in two or more orderings, then the suffix that begins with the object must be in both orderings. For example: >>> _mergeOrderings([ ... ['x', 'y', 'z'], ... ['q', 'z'], ... [1, 3, 5], ... ['z'] ... ]) ['x', 'y', 'q', 1, 3, 5, 'z'] )reversedinsert)Z orderingsseenresultZorderingor/usr/lib64/python3.6/ro.py_mergeOrderingssr cCs6|g}d}x&t|D]}|d7}|j|||<qW|S)Nrr)iter __bases__)obrirrr _flatten/s rcCstt|gS)z/Compute a "resolution order" for an object )r r)objectrrr ro=srN)__doc__Z __docformat__r rrrrrr s