ó  îRac@s†yddlmZWn!ek r7ddlmZnXy ddlmZmZmZWnek rknXde fd„ƒYZ dS(iÿÿÿÿ(t get_ident(tKeysViewt ValuesViewt ItemsViewt OrderedDictcBseZdZd„Zejd„Zejd„Zd„Zd„Zd„Z e d„Z d„Z d „Z d „Zd „Zd „Zd „Zd„ZeZeƒZed„Zdd„Zid„Zd„Zd„Zedd„ƒZd„Zd„Zd„Zd„Z d„Z!RS(s)Dictionary that remembers insertion ordercOs„t|ƒdkr+tdt|ƒƒ‚ny |jWn7tk rog|_}||dg|(i|_nX|j||ŽdS(sÅInitialize an ordered dictionary. Signature is the same as for regular dictionaries, but keyword arguments are not recommended because their insertion order is arbitrary. is$expected at most 1 arguments, got %dN(tlent TypeErrort_OrderedDict__roottAttributeErrortNonet_OrderedDict__mapt_OrderedDict__update(tselftargstkwdstroot((sn/opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pyt__init__7s    cCs\||krH|j}|d}|||g|d<|d<|j| od[i]=yiiN(RR (R tkeytvaluet dict_setitemRtlast((sn/opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pyt __setitem__Gs    )cCs@|||ƒ|jj|ƒ\}}}||d<||d del od[y]iiN(R tpop(R Rt dict_delitemt link_prevt link_next((sn/opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pyt __delitem__Qs  ccs=|j}|d}x#||k r8|dV|d}qWdS(sod.__iter__() <==> iter(od)iiN(R(R Rtcurr((sn/opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pyt__iter__Zs    ccs=|j}|d}x#||k r8|dV|d}qWdS(s#od.__reversed__() <==> reversed(od)iiN(R(R RR((sn/opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pyt __reversed__bs    cCsmyHx|jjƒD] }|2qW|j}||dg|(|jjƒWntk r[nXtj|ƒdS(s.od.clear() -> None. Remove all items from od.N(R t itervaluesRR tclearRtdict(R tnodeR((sn/opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pyRjs  cCs§|stdƒ‚n|j}|rO|d}|d}||d<||d (k, v), return and remove a (key, value) pair. Pairs are returned in LIFO order if last is true or FIFO order if false. sdictionary is emptyiii(tKeyErrorRR R R(R RRtlinkRRRR((sn/opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pytpopitemvs            cCs t|ƒS(sod.keys() -> list of keys in od(tlist(R ((sn/opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pytkeysscCsg|D]}||^qS(s#od.values() -> list of values in od((R R((sn/opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pytvalues“scCs!g|D]}|||f^qS(s.od.items() -> list of (key, value) pairs in od((R R((sn/opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pytitems—scCs t|ƒS(s0od.iterkeys() -> an iterator over the keys in od(titer(R ((sn/opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pytiterkeys›sccsx|D]}||VqWdS(s2od.itervalues -> an iterator over the values in odN((R tk((sn/opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pyRŸs ccs$x|D]}|||fVqWdS(s9od.items -> an iterator over the (key, value) items in odN((R R+((sn/opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pyR(¤s cOs&t|ƒdkr.tdt|ƒfƒ‚n|sCtdƒ‚n|d}d}t|ƒdkrr|d}nt|tƒr£xw|D]}|||| None. Update od from dict/iterable E and F. If E is a dict instance, does: for k in E: od[k] = E[k] If E has a .keys() method, does: for k in E.keys(): od[k] = E[k] Or if E is an iterable of items, does: for k, v in E: od[k] = v In either case, this is followed by: for k, v in F.items(): od[k] = v is8update() takes at most 2 positional arguments (%d given)s,update() takes at least 1 argument (0 given)iiR&N((RRt isinstanceR thasattrR&R((R RR totherRR((sn/opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pytupdate«s&    cCsC||kr!||}||=|S||jkr?t|ƒ‚n|S(s©od.pop(k[,d]) -> v, remove specified key and return the corresponding value. If key is not found, d is returned if given, otherwise KeyError is raised. (t_OrderedDict__markerR"(R Rtdefaulttresult((sn/opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pyRÎs  cCs"||kr||S|||<|S(sDod.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in od((R RR1((sn/opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pyt setdefaultÛs  cCsst|ƒtƒf}||kr%dSd|| repr(od)s...is%s()s%s(%r)N(tidt _get_identt __class__t__name__R((R t _repr_runningtcall_key((sn/opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pyt__repr__âs  cCsˆg|D]}|||g^q}t|ƒjƒ}x'ttƒƒD]}|j|dƒqEW|rx|j|f|fS|j|ffS(s%Return state information for picklingN(tvarstcopyRRR R6(R R+R(t inst_dict((sn/opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pyt __reduce__ïs#cCs |j|ƒS(s!od.copy() -> a shallow copy of od(R6(R ((sn/opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pyR<ùscCs(|ƒ}x|D]}||| New ordered dictionary with keys from S and values equal to v (which defaults to None). ((tclstiterableRtdR((sn/opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pytfromkeysýs  cCsMt|tƒr=t|ƒt|ƒko<|jƒ|jƒkStj||ƒS(s“od.__eq__(y) <==> od==y. Comparison to another OD is order-sensitive while comparison to a regular mapping is order-insensitive. (R,RRR(R t__eq__(R R.((sn/opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pyRCs.cCs ||k S(N((R R.((sn/opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pyt__ne__scCs t|ƒS(s@od.viewkeys() -> a set-like object providing a view on od's keys(R(R ((sn/opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pytviewkeysscCs t|ƒS(s<od.viewvalues() -> an object providing a view on od's values(R(R ((sn/opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pyt viewvaluesscCs t|ƒS(sBod.viewitems() -> a set-like object providing a view on od's items(R(R ((sn/opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pyt viewitemssN("R7t __module__t__doc__RR RRRRRtTrueR$R&R'R(R*RR/R tobjectR0RR R3R:R>R<t classmethodRBRCRDRERFRG(((sn/opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pyR+s:                  N( tthreadRR5t ImportErrort dummy_threadt_abcollRRRR R(((sn/opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pyt s