ok

Mini Shell

Direktori : /lib/python2.7/site-packages/kitchen/pycompat25/collections/
Upload File :
Current File : //lib/python2.7/site-packages/kitchen/pycompat25/collections/_defaultdict.pyc

�
i�:Oc@sBdZddlZddlmZdefd��YZdZdS(s
-----------
defaultdict
-----------

This is a pure python implementation of defaultdict that is compatible with
the defaultdict class provided by python-2.5 and above.

.. seealso::
    :class:`collections.defaultdict`
        for documentation on this module
i����N(tb_tdefaultdictcBsSeZdd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
RS(	cOsQ|dk	r1t|d�r1ttd���ntj|||�||_dS(Nt__call__sFirst argument must be callable(tNonethasattrt	TypeErrorRtdictt__init__tdefault_factory(tselfRtargstkwargs((sO/usr/lib/python2.7/site-packages/kitchen/pycompat25/collections/_defaultdict.pyRZs
cCs6ytj||�SWntk
r1|j|�SXdS(N(Rt__getitem__tKeyErrort__missing__(R	tkey((sO/usr/lib/python2.7/site-packages/kitchen/pycompat25/collections/_defaultdict.pyRas
cCs6|jdkrt|��n|j�||<}|S(N(RRR
(R	Rtvalue((sO/usr/lib/python2.7/site-packages/kitchen/pycompat25/collections/_defaultdict.pyRgscCsF|jdkrt�}n|jf}t|�|dd|j�fS(N(RRttuplettypet	iteritems(R	R
((sO/usr/lib/python2.7/site-packages/kitchen/pycompat25/collections/_defaultdict.pyt
__reduce__mscCs
|j�S(N(t__copy__(R	((sO/usr/lib/python2.7/site-packages/kitchen/pycompat25/collections/_defaultdict.pytcopytscCst|�|j|�S(N(RR(R	((sO/usr/lib/python2.7/site-packages/kitchen/pycompat25/collections/_defaultdict.pyRwscCs1ddl}t|�|j|j|j���S(Ni����(RRRtdeepcopytitems(R	tmemoR((sO/usr/lib/python2.7/site-packages/kitchen/pycompat25/collections/_defaultdict.pyt__deepcopy__zscCskt|jtj�rE|jjdk	rEt|jjt�rEd}nt	|j�}d|t
j|�fS(Ns-<bound method sub._factory of defaultdict(...sdefaultdict(%s, %s)(t
isinstanceRttypest
MethodTypetim_selfRt
issubclasstim_classRtreprRt__repr__(R	tdefrepr((sO/usr/lib/python2.7/site-packages/kitchen/pycompat25/collections/_defaultdict.pyR"~s	N(t__name__t
__module__RRRRRRRRR"(((sO/usr/lib/python2.7/site-packages/kitchen/pycompat25/collections/_defaultdict.pyRYs						(R(t__doc__RtkitchenRRRt__all__(((sO/usr/lib/python2.7/site-packages/kitchen/pycompat25/collections/_defaultdict.pyt<module>Hs0

Zerion Mini Shell 1.0