Mini Kabibi Habibi

Current Path : C:/Users/ITO/AppData/Local/Programs/GIMP 2/lib/python2.7/site-packages/attr/
Upload File :
Current File : C:/Users/ITO/AppData/Local/Programs/GIMP 2/lib/python2.7/site-packages/attr/_funcs.pyc

�
+I�]c@`s�ddlmZmZmZddlZddlmZddlmZm	Z	m
Z
ddlmZe
deed�Zd�Ze
deed	�Zd
�Zd�Zd�ZdS(
i(tabsolute_importtdivisiontprint_functionNi(t	iteritems(tNOTHINGt_obj_setattrtfields(tAttrsAttributeNotFoundErrorc	`smt|j�}|�}xN|D]F}t||j�}�dk	rY�||�rYqn|tkrXt|j�r�t|t�|��||j<qet|t	t
tf�r�tkr�|jnt
}	|	g|D]}
t|
�|��^q��||j<qet|t
�rH|�����fd�t|�D��||j<qe|||j<q|||j<qW|S(s�
    Return the ``attrs`` attribute values of *inst* as a dict.

    Optionally recurse into other ``attrs``-decorated classes.

    :param inst: Instance of an ``attrs``-decorated class.
    :param bool recurse: Recurse into classes that are also
        ``attrs``-decorated.
    :param callable filter: A callable whose return code determines whether an
        attribute or element is included (``True``) or dropped (``False``).  Is
        called with the `attr.Attribute` as the first argument and the
        value as the second argument.
    :param callable dict_factory: A callable to produce dictionaries from.  For
        example, to produce ordered dictionaries instead of normal Python
        dictionaries, pass in ``collections.OrderedDict``.
    :param bool retain_collection_types: Do not convert to ``list`` when
        encountering an attribute whose type is ``tuple`` or ``set``.  Only
        meaningful if ``recurse`` is ``True``.

    :rtype: return type of *dict_factory*

    :raise attr.exceptions.NotAnAttrsClassError: If *cls* is not an ``attrs``
        class.

    ..  versionadded:: 16.0.0 *dict_factory*
    ..  versionadded:: 16.1.0 *retain_collection_types*
    c3`s?|]5\}}t|����t|����fVqdS(N(t_asdict_anything(t.0tkktvv(tdftfiltertretain_collection_types(s3/mingw64/lib/python2.7/site-packages/attr/_funcs.pys	<genexpr>DsN(Rt	__class__tgetattrtnametNonetTruethastasdictt
isinstancettupletlisttsetRtdictR(tinsttrecurseR
tdict_factoryRtattrstrvtatvtcfti((RR
Rs3/mingw64/lib/python2.7/site-packages/attr/_funcs.pyR
s."	
2c`s�t|jdd�dk	r6t|t�|��}n�t|tttf�r��tkrc|jnt}|g|D]}t	|�|��^qs�}nFt|t
�r�|�����fd�t|�D��}n|}|S(sK
    ``asdict`` only works on attrs instances, this works on anything.
    t__attrs_attrs__c3`s?|]5\}}t|����t|����fVqdS(N(R(R	R
R(RR
R(s3/mingw64/lib/python2.7/site-packages/attr/_funcs.pys	<genexpr>isN(RRRRRRRRRRRR(tvalR
RRRR"R#((RR
Rs3/mingw64/lib/python2.7/site-packages/attr/_funcs.pyRUs+c`s�t|j�}g}|�x�|D]�}t||j�}|dk	r\|||�r\q"n|tkr�t|j�r�|jt|dtd|d�d���q�t	|t
ttf�r4�tkr�|jnt}	|j|	g|D]?}
t|
j�r!t|
dtd|d�d��n|
^q���q�t	|t
�r��tkrX|jnt
}|j|��fd�t|�D���q�|j|�q"|j|�q"W�tkr�|S�|�S(s1
    Return the ``attrs`` attribute values of *inst* as a tuple.

    Optionally recurse into other ``attrs``-decorated classes.

    :param inst: Instance of an ``attrs``-decorated class.
    :param bool recurse: Recurse into classes that are also
        ``attrs``-decorated.
    :param callable filter: A callable whose return code determines whether an
        attribute or element is included (``True``) or dropped (``False``).  Is
        called with the `attr.Attribute` as the first argument and the
        value as the second argument.
    :param callable tuple_factory: A callable to produce tuples from.  For
        example, to produce lists instead of tuples.
    :param bool retain_collection_types: Do not convert to ``list``
        or ``dict`` when encountering an attribute which type is
        ``tuple``, ``dict`` or ``set``.  Only meaningful if ``recurse`` is
        ``True``.

    :rtype: return type of *tuple_factory*

    :raise attr.exceptions.NotAnAttrsClassError: If *cls* is not an ``attrs``
        class.

    ..  versionadded:: 16.2.0
    RR
t
tuple_factoryRc3`so|]e\}}t|j�r6t|d�d��n|t|j�r`t|d�d��n|fVqdS(R&RN(RRtastuple(R	R
R(tretainR&(s3/mingw64/lib/python2.7/site-packages/attr/_funcs.pys	<genexpr>�sN(RRRRRRRtappendR'RRRRRR(RRR
R&RRRR R!R"tjR((R(R&s3/mingw64/lib/python2.7/site-packages/attr/_funcs.pyR'ts>!

	PcC`st|dd�dk	S(s�
    Check whether *cls* is a class with ``attrs`` attributes.

    :param type cls: Class to introspect.
    :raise TypeError: If *cls* is not a class.

    :rtype: bool
    R$N(RR(tcls((s3/mingw64/lib/python2.7/site-packages/attr/_funcs.pyR�s	cK`s�ddl}|jdtdd�tj|�}t|j�}xlt|�D]^\}}t||t�}|tkr�t	dj
d|d|j���nt|||�qMW|S(	s�
    Copy *inst* and apply *changes*.

    :param inst: Instance of a class with ``attrs`` attributes.
    :param changes: Keyword changes in the new copy.

    :return: A copy of inst with *changes* incorporated.

    :raise attr.exceptions.AttrsAttributeNotFoundError: If *attr_name* couldn't
        be found on *cls*.
    :raise attr.exceptions.NotAnAttrsClassError: If *cls* is not an ``attrs``
        class.

    ..  deprecated:: 17.1.0
        Use `evolve` instead.
    iNs6assoc is deprecated and will be removed after 2018/01.t
stacklevelis&{k} is not an attrs attribute on {cl}.tktcl(twarningstwarntDeprecationWarningtcopyRRRRRRtformatR(RtchangesR/tnewRR-R!R ((s3/mingw64/lib/python2.7/site-packages/attr/_funcs.pytassoc�s	cK`s�|j}t|�}xh|D]`}|js1qn|j}|ddkrP|n|d}||krt||�||<qqW||�S(s�
    Create a new instance, based on *inst* with *changes* applied.

    :param inst: Instance of a class with ``attrs`` attributes.
    :param changes: Keyword changes in the new copy.

    :return: A copy of inst with *changes* incorporated.

    :raise TypeError: If *attr_name* couldn't be found in the class
        ``__init__``.
    :raise attr.exceptions.NotAnAttrsClassError: If *cls* is not an ``attrs``
        class.

    ..  versionadded:: 17.1.0
    it_i(RRtinitRR(RR4R+RR t	attr_namet	init_name((s3/mingw64/lib/python2.7/site-packages/attr/_funcs.pytevolve	s	
		 (t
__future__RRRR2t_compatRt_makeRRRt
exceptionsRRRRtFalseRRRR'RR6R;(((s3/mingw64/lib/python2.7/site-packages/attr/_funcs.pyt<module>s F	!^		&