Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/zope/interface/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/zope/interface/ro.pyc

ó
ÔËÞKc@s.dZdZd„Zdd„Zd„ZdS(siCompute a resolution order for an object and its bases

$Id: ro.py 110536 2010-04-06 02:59:44Z tseaver $
trestructuredtextcCstt|ƒgƒS(s/Compute a "resolution order" for an object
    (tmergeOrderingst_flatten(tobject((s5/usr/lib/python2.7/dist-packages/zope/interface/ro.pytroscCs‘|dkri}ng}|jƒx[|D]S}t|ƒ}|jƒx4|D],}||krOd||<|j|ƒqOqOWq,W|jƒ|S(s¡Merge 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']

    iN(tNonetreversetlisttappend(t	orderingstseentresulttorderingto((s5/usr/lib/python2.7/dist-packages/zope/interface/ro.pyRs	





cCsD|g}d}x.t|ƒD] }|d7}|j|||+qW|S(Nii(titert	__bases__(tobRti((s5/usr/lib/python2.7/dist-packages/zope/interface/ro.pyR<s	
N(t__doc__t
__docformat__RRRR(((s5/usr/lib/python2.7/dist-packages/zope/interface/ro.pyt<module>s	"