Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/module_utils/common/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/module_utils/common/collections.pyo

�
�Udac@`s�dZddlmZmZmZeZddlmZm	Z	ddl
mZmZm
Z
deefd��YZd�Zed�Zed	�Zd
�ZdS(s*Collection of low-level utility functions.i(tabsolute_importtdivisiontprint_function(tbinary_typet	text_type(tHashabletMappingtSequencet
ImmutableDictcB`sVeZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
RS(	s!Dictionary that cannot be updatedcO`st||�|_dS(N(tdictt_store(tselftargstkwargs((sK/usr/lib/python2.7/site-packages/ansible/module_utils/common/collections.pyt__init__scC`s|j|S(N(R
(Rtkey((sK/usr/lib/python2.7/site-packages/ansible/module_utils/common/collections.pyt__getitem__scC`s
|jj�S(N(R
t__iter__(R((sK/usr/lib/python2.7/site-packages/ansible/module_utils/common/collections.pyRscC`s
|jj�S(N(R
t__len__(R((sK/usr/lib/python2.7/site-packages/ansible/module_utils/common/collections.pyRscC`stt|j���S(N(thasht	frozensettitems(R((sK/usr/lib/python2.7/site-packages/ansible/module_utils/common/collections.pyt__hash__scC`sdjt|j��S(NsImmutableDict({0})(tformattreprR
(R((sK/usr/lib/python2.7/site-packages/ansible/module_utils/common/collections.pyt__repr__scC`st|j|�S(s�
        Create an ImmutableDict as a combination of the original and overriding_mapping

        :arg overriding_mapping: A Mapping of replacement and additional items
        :return: A copy of the ImmutableDict with key-value pairs from the overriding_mapping added

        If any of the keys in overriding_mapping are already present in the original ImmutableDict,
        the overriding_mapping item replaces the one in the original ImmutableDict.
        (RR
(Rtoverriding_mapping((sK/usr/lib/python2.7/site-packages/ansible/module_utils/common/collections.pytunion"s
c`sEt|���fd��jj�D�}t�fd�|D��S(sK
        Create an ImmutableDict as a combination of the original minus keys in subtractive_iterable

        :arg subtractive_iterable: Any iterable containing keys that should not be present in the
            new ImmutableDict
        :return: A copy of the ImmutableDict with keys from the subtractive_iterable removed
        c3`s!|]}|�kr|VqdS(N((t.0tk(tremove_keys(sK/usr/lib/python2.7/site-packages/ansible/module_utils/common/collections.pys	<genexpr>7sc3`s"|]}|�j|fVqdS(N(R
(RR(R(sK/usr/lib/python2.7/site-packages/ansible/module_utils/common/collections.pys	<genexpr>8s(RR
tkeysR(Rtsubtractive_iterableR((RRsK/usr/lib/python2.7/site-packages/ansible/module_utils/common/collections.pyt
difference.s(t__name__t
__module__t__doc__RRRRRRRR!(((sK/usr/lib/python2.7/site-packages/ansible/module_utils/common/collections.pyRs							cC`st|ttf�S(sCIdentify whether the input has a string-like type (inclding bytes).(t
isinstanceRR(tseq((sK/usr/lib/python2.7/site-packages/ansible/module_utils/common/collections.pyt	is_string;scC`sB|rt|�rtSyt|�tSWntk
r=tSXdS(s*Identify whether the input is an iterable.N(R'tFalsetitertTruet	TypeError(R&tinclude_strings((sK/usr/lib/python2.7/site-packages/ansible/module_utils/common/collections.pytis_iterable@s

cC`s$|rt|�rtSt|t�S(s�Identify whether the input is a sequence.

    Strings and bytes are not sequences here,
    unless ``include_string`` is ``True``.

    Non-indexable things are never of a sequence type.
    (R'R(R%R(R&R,((sK/usr/lib/python2.7/site-packages/ansible/module_utils/common/collections.pytis_sequenceLscC`sSt|�std��nt�}x(|D] }|j|d�d||<q+W|S(sTReturns a dictionary with the number of appearances of each element of the iterable.

    Resembles the collections.Counter class functionality. It is meant to be used when the
    code is run on Python 2.6.* where collections.Counter is not available. It should be
    deprecated and replaced when support for Python < 2.7 is dropped.
    s%Argument provided  is not an iterableii(R-t	ExceptionR	tget(R&tcounterstelem((sK/usr/lib/python2.7/site-packages/ansible/module_utils/common/collections.pytcountZs	
N(R$t
__future__RRRttypet
__metaclass__tansible.module_utils.sixRRt/ansible.module_utils.common._collections_compatRRRRR'R(R-R.R3(((sK/usr/lib/python2.7/site-packages/ansible/module_utils/common/collections.pyt<module>s-	

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]