mò ö.Ë;c@sçdZdkZdkZdkZdklZdkZdfd„ƒYZdefd„ƒYZ ee ƒe djoleƒZ de d scCsg|_|iiƒdS(s Clear the object. N(RRRtclear(R((R R;Gs cCsdk}|i|ƒS(s. Return a shallow copy of the object. N(R.R(RR.((R R.Ns cCs |i|S(s, Returns the key at position index. N(RRR4(RR4((R RUscCs|iS(s\ Returns a list of keys in the order they are maintained by the object. N(RR(R((R R([scCs(|i}t|i|ƒ}t||ƒS(sj Returns a list of (key,value) tuples in the order they are maintained by the object. N(RRR(textractRtvaluesttuples(RR(R=((R Rbs cCs|i}t|i|ƒ}|S(s^ Returns a list of values in the order they are maintained by the object. N(RRR(R<RR=(RR(R=((R R=ks cCs|ii|ƒS(sS Returns 1/0 depending on whether the given key exists or not. N(RRRR(RR((R RtscCs|ii||ƒS(sx Return the value for key or default in case it is not found. This only works for non-index keys. N(RRtgetRtdefault(RRR@((R R?~scCsd|i}g}|i}xE|iD]:}||}|||ƒ}|dj o||ƒq"q"W|S(sA Filters the mapping's keys and values according to a filterfct. The filterfct is called with (k,v) for each key value pair in the current order. If its return value is non-None, it is appended to the result list. The list is returned to the caller. N( RRR R Rtktvt filterfcttresultR(RRCRAR RRDRBR ((R tfilter‡s      ($t__name__t __module__t__doc__RR RRRRR2R R!R"R$R)R,R-R0t__radd__R R3R#R7R4RR5R9R;R.RR(RR=RR?RE(((R R s>               tOrderedMappingWithDefaultcBs&tZdZdZeied„ZRS(s¦ OrderedMapping with default values. This version returns self._default in case a lookup fails. self._default is set to '' for this base class. tcCs€||ƒ|jo=y|i|}Wntj o|iSq|X|i|Sn-y|i|SWnt j o|iSnXdS(s Returns the object at position keyindex. If not found, ._default is returned. keyindex may either be an integer to index an object by position or an arbitrary key object which is then used for dictionary like lookup. N( RRR RRRt IndexErrort_defaultRtKeyError(RRR RR((R R!©s  (RFRGRHRMR2R RR!(((R RJŸs t__main__tbtatcR tBtAtCt1it2it3i(RHR2Rtoperatortmx.Toolstfreezetmx.Tools.NewBuiltinstmxRRJRFtotptr( RRR^R[R_R`RYRJR]R2((R t?s   ÿ“'