Plan 9 from Bell Labs’s /usr/web/sources/contrib/stallion/root/sys/lib/python2.7/UserDict.pyo

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


�`^c@sbdZdd	d��YZdefd��YZddlZejje�dd
d��YZdS(sGA more or less complete user-defined wrapper around dictionary objects.tUserDictcBs�eZdd�Zd�Zd�ZdZd�Zd�Zd�Z	d�Z
d�Zd�Zd	�Z
d
�Zd�Zd�Zd
�Zd�Zd�Zdd�Zdd�Zdd�Zd�Zd�Zd�Zedd��ZRS(cKsEi|_|dk	r%|j|�nt|�rA|j|�ndS(N(tdatatNonetupdatetlen(tselftdicttkwargs((s/sys/lib/python2.7/UserDict.pyt__init__s
	cCs
t|j�S(N(treprR(R((s/sys/lib/python2.7/UserDict.pyt__repr__
scCs6t|t�r"t|j|j�St|j|�SdS(N(t
isinstanceRtcmpR(RR((s/sys/lib/python2.7/UserDict.pyt__cmp__scCs
t|j�S(N(RR(R((s/sys/lib/python2.7/UserDict.pyt__len__scCsO||jkr|j|St|jd�r?|jj||�St|��dS(Nt__missing__(Rthasattrt	__class__RtKeyError(Rtkey((s/sys/lib/python2.7/UserDict.pyt__getitem__s
cCs||j|<dS(N(R(RRtitem((s/sys/lib/python2.7/UserDict.pyt__setitem__scCs|j|=dS(N(R(RR((s/sys/lib/python2.7/UserDict.pyt__delitem__scCs|jj�dS(N(Rtclear(R((s/sys/lib/python2.7/UserDict.pyRscCsq|jtkr"t|jj��Sddl}|j}zi|_|j|�}Wd||_X|j|�|S(Ni�(RRRtcopyR(RRRtc((s/sys/lib/python2.7/UserDict.pyRs		

cCs
|jj�S(N(Rtkeys(R((s/sys/lib/python2.7/UserDict.pyR'scCs
|jj�S(N(Rtitems(R((s/sys/lib/python2.7/UserDict.pyR(scCs
|jj�S(N(Rt	iteritems(R((s/sys/lib/python2.7/UserDict.pyR)scCs
|jj�S(N(Rtiterkeys(R((s/sys/lib/python2.7/UserDict.pyR*scCs
|jj�S(N(Rt
itervalues(R((s/sys/lib/python2.7/UserDict.pyR+scCs
|jj�S(N(Rtvalues(R((s/sys/lib/python2.7/UserDict.pyR ,scCs
||jkS(N(R(RR((s/sys/lib/python2.7/UserDict.pythas_key-scKs�|dkrn�t|t�r4|jj|j�n_t|ti��sYt|d�rl|jj|�n'x$|j�D]\}}|||<qyWt|�r�|jj|�ndS(NR(	RRRRRttypeRRR(RRRtktv((s/sys/lib/python2.7/UserDict.pyR.s%cCs||kr|S||S(N((RRtfailobj((s/sys/lib/python2.7/UserDict.pytget:scCs!||kr|||<n||S(N((RRR%((s/sys/lib/python2.7/UserDict.pyt
setdefault>s
cGs|jj||�S(N(Rtpop(RRtargs((s/sys/lib/python2.7/UserDict.pyR(BscCs
|jj�S(N(Rtpopitem(R((s/sys/lib/python2.7/UserDict.pyR*DscCs
||jkS(N(R(RR((s/sys/lib/python2.7/UserDict.pyt__contains__FscCs(|�}x|D]}|||<qW|S(N((tclstiterabletvaluetdR((s/sys/lib/python2.7/UserDict.pytfromkeysHs	
N(t__name__t
__module__RRR
R
t__hash__RRRRRRRRRRRR R!RR&R'R(R*R+tclassmethodR0(((s/sys/lib/python2.7/UserDict.pyRs2																		tIterableUserDictcBseZd�ZRS(cCs
t|j�S(N(titerR(R((s/sys/lib/python2.7/UserDict.pyt__iter__Ps(R1R2R7(((s/sys/lib/python2.7/UserDict.pyR5Osi�Nt	DictMixincBs�eZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
dd	�Zd
�Z
d�Zdd�Zdd
�Zd�Zd�Zd�ZRS(ccs x|j�D]}|Vq
WdS(N(R(RR#((s/sys/lib/python2.7/UserDict.pyR7`scCs%y||Wntk
r tSXtS(N(RtFalsetTrue(RR((s/sys/lib/python2.7/UserDict.pyR!cs

cCs
|j|�S(N(R!(RR((s/sys/lib/python2.7/UserDict.pyR+isccs$x|D]}|||fVqWdS(N((RR#((s/sys/lib/python2.7/UserDict.pyRms
cCs
|j�S(N(R7(R((s/sys/lib/python2.7/UserDict.pyRpsccs&x|j�D]\}}|Vq
WdS(N(R(Rt_R$((s/sys/lib/python2.7/UserDict.pyRtscCs#g|j�D]\}}|^q
S(N(R(RR;R$((s/sys/lib/python2.7/UserDict.pyR wscCst|j��S(N(tlistR(R((s/sys/lib/python2.7/UserDict.pyRyscCs"x|j�D]
}||=q
WdS(N(R(RR((s/sys/lib/python2.7/UserDict.pyR{scCs.y||SWntk
r)|||<nX|S(N(R(RRtdefault((s/sys/lib/python2.7/UserDict.pyR'~s

cGspt|�dkr2tdtdt|���ny||}Wn"tk
rd|r^|dS�nX||=|S(Nis&pop expected at most 2 arguments, got i(Rt	TypeErrorR	R(RRR)R.((s/sys/lib/python2.7/UserDict.pyR(�s
cCsJy|j�j�\}}Wntk
r8td�nX||=||fS(Nscontainer is empty(Rtnextt
StopIterationR(RR#R$((s/sys/lib/python2.7/UserDict.pyR*�s

cKs�|dkrn�t|d�rHx|j�D]\}}|||<q+WnXt|d�rxF|j�D]}||||<qdWn!x|D]\}}|||<q�W|r�|j|�ndS(NRR(RRRRR(RtotherRR#R$((s/sys/lib/python2.7/UserDict.pyR�scCs%y||SWntk
r |SXdS(N(R(RRR=((s/sys/lib/python2.7/UserDict.pyR&�s
cCstt|j���S(N(R	RR(R((s/sys/lib/python2.7/UserDict.pyR
�scCsM|dkrdSt|t�r4t|j��}ntt|j��|�S(Ni(RRR8RRR(RRA((s/sys/lib/python2.7/UserDict.pyR
�s
cCst|j��S(N(RR(R((s/sys/lib/python2.7/UserDict.pyR�sN(R1R2R7R!R+RRRR RRRR'R(R*RR&R
R
R(((s/sys/lib/python2.7/UserDict.pyR8Ws"														(((t__doc__RR5t_abcolltMutableMappingtregisterR8(((s/sys/lib/python2.7/UserDict.pyt<module>s
L

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].