ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ bNc@sddlZddlZddlZddlmZdefdYZdefdYZidd6Zed krddl Z e j ndS( iN(t DictMixint MultiDictcBseZdZdZdZdZdZdZdZdZ dZ d Z d Z e Z d Zd Zdd ZdZdZddZdZdZdZdZeZdZdZdZdZRS(s An ordered dictionary that can have multiple values for each key. Adds the methods getall, getone, mixed, and add to the normal dictionary interface. cOst|dkr!tdn|rt|ddrSt|dj}n6t|ddry|dj}nt|d}||_n g|_|jj|jdS(Nis9MultiDict can only be called with one positional argumentit iteritemstitems(tlent TypeErrorthasattrtlistRRt_itemstextend(tselftargstkwR((sE/opt/alt/python27/lib/python2.7/site-packages/paste/util/multidict.pyt__init__s   cCs@x'|jD]\}}||kr |Sq Wtt|dS(N(RtKeyErrortrepr(R tkeytktv((sE/opt/alt/python27/lib/python2.7/site-packages/paste/util/multidict.pyt __getitem__ s cCs9y ||=Wntk rnX|jj||fdS(N(RRtappend(R Rtvalue((sE/opt/alt/python27/lib/python2.7/site-packages/paste/util/multidict.pyt __setitem__&s   cCs|jj||fdS(sL Add the key and value, not overwriting any previous value. N(RR(R RR((sE/opt/alt/python27/lib/python2.7/site-packages/paste/util/multidict.pytadd-scCs@g}x3|jD](\}}||kr|j|qqW|S(sU Return a list of all values matching the key (may be an empty list) (RR(R RtresultRR((sE/opt/alt/python27/lib/python2.7/site-packages/paste/util/multidict.pytgetall3s  cCs[|j|}|s(td|nt|dkrStd||fn|dS(sk Get one value matching the key, raising a KeyError if multiple values were found. sKey not found: %risMultiple values match %r: %ri(RRR(R RR((sE/opt/alt/python27/lib/python2.7/site-packages/paste/util/multidict.pytgetone=s cCsi}i}xn|jD]c\}}||kro||krN||j|qy|||g||}n|j|}|||j|g|jjD]*\}}|j||j|f^qS(N(RRRFRL(R RR((sE/opt/alt/python27/lib/python2.7/site-packages/paste/util/multidict.pyRcsccsAx:|jjD])\}}|j||j|fVqWdS(N(RRRFRL(R RR((sE/opt/alt/python27/lib/python2.7/site-packages/paste/util/multidict.pyRgscCs)g|jjD]}|j|^qS(N(RR8RL(R R((sE/opt/alt/python27/lib/python2.7/site-packages/paste/util/multidict.pyR7ksccs,x%|jjD]}|j|VqWdS(N(RR8RL(R R((sE/opt/alt/python27/lib/python2.7/site-packages/paste/util/multidict.pyR8nsN( R2R9R:RRR RFRLRRRRRRRR$R%R;R&R'R)R*R+R3R4R,R5R<RRR7R8(((sE/opt/alt/python27/lib/python2.7/site-packages/paste/util/multidict.pyR=s:                        s >>> d = MultiDict(a=1, b=2) >>> d['a'] 1 >>> d.getall('c') [] >>> d.add('a', 2) >>> d['a'] 1 >>> d.getall('a') [1, 2] >>> d['b'] = 4 >>> d.getall('b') [4] >>> d.keys() ['a', 'a', 'b'] >>> d.items() [('a', 1), ('a', 2), ('b', 4)] >>> d.mixed() {'a': [1, 2], 'b': 4} >>> MultiDict([('a', 'b')], c=2) MultiDict([('a', 'b'), ('c', 2)]) tgeneralt__main__( RHR'R?tUserDictRRR=t__test__R2tdoctestttestmod(((sE/opt/alt/python27/lib/python2.7/site-packages/paste/util/multidict.pyts