Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
3
2øªj� ã @ s d Z dgZG dd„ deƒZdS )zMisc dict tools.Úhashdictc @ sh e Zd ZdZdd„ Zdd„ Zdd„ Zdd „ Zd
d„ Zdd
„ Z dd„ Z
dd„ Zdd„ Zdd„ Z
dd„ ZdS )r a<
hashable dict implementation, suitable for use as a key into
other dicts.
>>> h1 = hashdict({"apples": 1, "bananas":2})
>>> h2 = hashdict({"bananas": 3, "mangoes": 5})
>>> h1+h2
hashdict(apples=1, bananas=3, mangoes=5)
>>> d1 = {}
>>> d1[h1] = "salad"
>>> d1[h1]
'salad'
>>> d1[h2]
Traceback (most recent call last):
...
KeyError: hashdict(bananas=3, mangoes=5)
based on answers from
http://stackoverflow.com/questions/1151658/python-hashable-dicts
c C s t t| jƒ ƒƒS )N)ÚtupleÚsortedÚitems)Úself© r ú=/tmp/pip-build-_d5lkt3n/fonttools/fontTools/misc/dictTools.pyZ__key s zhashdict.__keyc C s$ dj | jjdjdd„ | jƒ D ƒƒƒS )Nz{0}({1})z, c s s* | ]"}d j t|d ƒt|d ƒƒV qdS )z{0}={1}é é N)ÚformatÚstrÚrepr)Ú.0Úir r r ú ! s z$hashdict.__repr__..)r
Ú __class__Ú__name__ÚjoinÚ_hashdict__key)r r r r Ú__repr__ s
zhashdict.__repr__c C s t | jƒ ƒS )N)Úhashr )r r r r Ú__hash__$ s zhashdict.__hash__c C s t dj| jjƒƒ‚d S )Nz${0} does not support item assignment)Ú TypeErrorr
r r )r ÚkeyÚvaluer r r Ú__setitem__&