�
��c@sFdZddd��YZdefd��YZdd d��YZdS(
sGA more or less complete user-defined wrapper around dictionary objects.tUserDictcBs�eZdd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z
d�Zd �Zd
�Z
d�Zd�Zd
�Zd�Zd�Zdd�Zdd�Zdd�Zd�Zd�Zd�Zedd��ZRS(cKsIh|_|dj o|i|�nt|�o|i|�ndS(N(tdatatNonetupdatetlen(tselftdicttkwargs((s/sys/lib/python/UserDict.pyt__init__s
cCs
t|i�S(N(treprR(R((s/sys/lib/python/UserDict.pyt__repr__
scCs;t|t�ot|i|i�Snt|i|�SdS(N(t
isinstanceRtcmpR(RR((s/sys/lib/python/UserDict.pyt__cmp__scCs
t|i�S(N(RR(R((s/sys/lib/python/UserDict.pyt__len__scCsY||ijo|i|Snt|id�o|ii||�Snt|��dS(Nt__missing__(Rthasattrt __class__RtKeyError(Rtkey((s/sys/lib/python/UserDict.pyt__getitem__s
cCs||i|<dS(N(R(RRtitem((s/sys/lib/python/UserDict.pyt__setitem__scCs|i|=dS(N(R(RR((s/sys/lib/python/UserDict.pyt__delitem__scCs|ii�dS(N(Rtclear(R((s/sys/lib/python/UserDict.pyRscCsv|itjot|ii��Snddk}|i}zh|_|i|�}Wd||_X|i|�|S(Ni�(RRRtcopyR(RRRtc((s/sys/lib/python/UserDict.pyRs
cCs
|ii�S(N(Rtkeys(R((s/sys/lib/python/UserDict.pyR&scCs
|ii�S(N(Rtitems(R((s/sys/lib/python/UserDict.pyR'scCs
|ii�S(N(Rt iteritems(R((s/sys/lib/python/UserDict.pyR(scCs
|ii�S(N(Rtiterkeys(R((s/sys/lib/python/UserDict.pyR)scCs
|ii�S(N(Rt
itervalues(R((s/sys/lib/python/UserDict.pyR*scCs
|ii�S(N(Rtvalues(R((s/sys/lib/python/UserDict.pyR +scCs|ii|�S(N(Rthas_key(RR((s/sys/lib/python/UserDict.pyR!,scKs�|djon�t|t�o|ii|i�nct|th��pt|d�o|ii|�n(x$|i�D]\}}|||<q�Wt|�o|ii|�ndS(NR( RRRRRttypeRRR(RRRtktv((s/sys/lib/python/UserDict.pyR-s
'
cCs |i|�p|Sn||S(N(R!(RRtfailobj((s/sys/lib/python/UserDict.pytget9scCs&|i|�p|||<n||S(N(R!(RRR%((s/sys/lib/python/UserDict.pyt
setdefault=scGs|ii||�S(N(Rtpop(RRtargs((s/sys/lib/python/UserDict.pyR(AscCs
|ii�S(N(Rtpopitem(R((s/sys/lib/python/UserDict.pyR*CscCs
||ijS(N(R(RR((s/sys/lib/python/UserDict.pyt__contains__EscCs(|�}x|D]}|||<qW|S(N((tclstiterabletvaluetdR((s/sys/lib/python/UserDict.pytfromkeysGs
N(t__name__t
__module__RRR
R
RRRRRRRRRRRR R!RR&R'R(R*R+tclassmethodR0(((s/sys/lib/python/UserDict.pyRs0 tIterableUserDictcBseZd�ZRS(cCs
t|i�S(N(titerR(R((s/sys/lib/python/UserDict.pyt__iter__Os(R1R2R6(((s/sys/lib/python/UserDict.pyR4Nst DictMixincBs�eZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z
dd �Zd
�Z
d�Zdd�Zdd
�Zd�Zd�Zd�ZRS(ccs x|i�D]}|Vq
WdS(N(R(RR#((s/sys/lib/python/UserDict.pyR6[s
cCs,y||}Wntj
otSnXtS(N(RtFalsetTrue(RRR.((s/sys/lib/python/UserDict.pyR!^s
cCs
|i|�S(N(R!(RR((s/sys/lib/python/UserDict.pyR+dsccs$x|D]}|||fVqWdS(N((RR#((s/sys/lib/python/UserDict.pyRhscCs
|i�S(N(R6(R((s/sys/lib/python/UserDict.pyRksccs&x|i�D]\}}|Vq
WdS(N(R(Rt_R$((s/sys/lib/python/UserDict.pyRos
cCs+g}|i�D]\}}||q~S(N(R(Rt_[1]R:R$((s/sys/lib/python/UserDict.pyR rscCst|i��S(N(tlistR(R((s/sys/lib/python/UserDict.pyRtscCs"x|i�D]
}||=q
WdS(N(R(RR((s/sys/lib/python/UserDict.pyRvs
cCs0y||SWntj
o|||<nX|S(N(R(RRtdefault((s/sys/lib/python/UserDict.pyR'ys
cGsyt|�djo!tdtdt|���ny||}Wn)tj
o|o|dSn�nX||=|S(Nis&pop expected at most 2 arguments, got i(Rt TypeErrorR R(RRR)R.((s/sys/lib/python/UserDict.pyR(scCsLy|i�i�\}}Wntj
otd�nX||=||fS(Nscontainer is empty(Rtnextt
StopIterationR(RR#R$((s/sys/lib/python/UserDict.pyR*�scKs�|djon�t|d�o+x�|i�D]\}}|||<q.Wn[t|d�o)xG|i�D]}||||<qiWn"x|D]\}}|||<q�W|o|i|�ndS(NRR(RRRRR(RtotherRR#R$((s/sys/lib/python/UserDict.pyR�s
cCs*y||SWntj
o|SnXdS(N(R(RRR=((s/sys/lib/python/UserDict.pyR&�scCstt|i���S(N(R RR(R((s/sys/lib/python/UserDict.pyR
�scCsT|djodSnt|t�ot|i��}ntt|i��|�S(Ni(RRR7RRR(RRA((s/sys/lib/python/UserDict.pyR
�s
cCst|i��S(N(RR(R((s/sys/lib/python/UserDict.pyR�sN(R1R2R6R!R+RRRR RRRR'R(R*RR&R
R
R(((s/sys/lib/python/UserDict.pyR7Rs" N(((t__doc__RR4R7(((s/sys/lib/python/UserDict.pys<module>sK
|