ó —Àv]c@sSddlZddlmZdddgZd„Zdd „Zejd „ZdS( iÿÿÿÿNi(t_compattattachtmkdirst mapping_itemscs‡‡fd†}|S(sReturn a decorator doing ``setattr(object, name)`` with its argument. >>> spam = type('Spam', (object,), {})() >>> @attach(spam, 'eggs') ... def func(): ... pass >>> spam.eggs # doctest: +ELLIPSIS cstˆˆ|ƒ|S(N(tsetattr(tfunc(tnametobject(s2/tmp/pip-install-Qvdv_2/graphviz/graphviz/tools.pyt decorators((RRR((RRs2/tmp/pip-install-Qvdv_2/graphviz/graphviz/tools.pyR s iÿcCs9tjj|ƒ}|sdStj|d|dtƒdS(sHRecursively create directories up to the path of ``filename`` as needed.Ntmodetexist_ok(tostpathtdirnameRtmakedirstTrue(tfilenameR R ((s2/tmp/pip-install-Qvdv_2/graphviz/graphviz/tools.pyRscCs2t|ƒtkr(tt||ƒƒƒS||ƒS(s]Return an iterator over the ``mapping`` items, sort if it's a plain dict. >>> list(mapping_items({'spam': 0, 'ham': 1, 'eggs': 2})) [('eggs', 2), ('ham', 1), ('spam', 0)] >>> from collections import OrderedDict >>> list(mapping_items(OrderedDict(enumerate(['spam', 'ham', 'eggs'])))) [(0, 'spam'), (1, 'ham'), (2, 'eggs')] (ttypetdicttitertsorted(tmappingt _iteritems((s2/tmp/pip-install-Qvdv_2/graphviz/graphviz/tools.pyR"s (R tRt__all__RRt iteritemsR(((s2/tmp/pip-install-Qvdv_2/graphviz/graphviz/tools.pyts