��
r�$Lc�����������@���sy���d��Z��d�d�Ud�d�d�g�Z�d�e�f�d�������YZ�d�e�f�d�������YZ�d�e�f�d�������YZ�d	�e�f�d
�������YZ�d�S(���s���Classes to represent arbitrary sets (including sets of sets).

This module implements sets using dictionaries whose values are
ignored.  The usual operations (union, intersection, deletion, etc.)
are provided as both methods and operators.

Important: sets are not sequences!  While they support 'x in s',
'len(s)', and 'for x in s', none of those operations are unique for
sequences; for example, mappings support all three as well.  The
characteristic operation for sequences is subscripting with small
integers: s[i], for i in range(len(s)).  Sets don't support
subscripting at all.  Also, sequences allow multiple occurrences and
their elements have a definite order; sets on the other hand don't
record multiple occurrences and don't remember the order of element
insertion (which is why they don't support s[i]).

The following classes are provided:

BaseSet -- All the operations common to both mutable and immutable
    sets. This is an abstract class, not meant to be directly
    instantiated.

Set -- Mutable sets, subclass of BaseSet; not hashable.

ImmutableSet -- Immutable sets, subclass of BaseSet; hashable.
    An iterable argument is mandatory to create an ImmutableSet.

_TemporarilyImmutableSet -- A wrapper around a Set, hashable,
    giving the same hash value as the immutable set equivalent
    would have.  Do not use this class directly.

Only hashable objects can be added to a Set. In particular, you cannot
really add a Set as an element to another Set; if you try, what is
actually added is an ImmutableSet built from it (it compares equal to
the one you tried adding).

When you ask if `x in y' where x is a Set and y is a Set or
ImmutableSet, x is wrapped into a _TemporarilyImmutableSet z, and
what's tested is actually `z in y'.

s1���from itertools import ifilterfalse as filterfalseNt���BaseSett���Sett���ImmutableSetc�����������B���s��e��Z�d��Z�d�g�Z�d����Z�d����Z�d����Z�e�Z�e�d���Z	�d����Z
�d����Z�d����Z�d	����Z
�d
����Z�e�Z�d����Z�d����Z�d
����Z�d����Z�d����Z�d����Z�d����Z�d����Z�d����Z�d����Z�d����Z�d����Z�e�Z�e�Z�d����Z�d����Z�d����Z �d����Z!�d����Z"�RS(���s1���Common base class for mutable and immutable sets.t���_datac���������C���s$���|��i��t�j�o�t�d�����n�d�S(���s���This is an abstract class.s7���BaseSet is an abstract class.  Use Set or ImmutableSet.N(���t	���__class__R����t	���TypeError(���t���self(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyt���__init__E���s����c���������C���s
���t��|��i���S(���s'���Return the number of elements of a set.(���t���lenR���(���R���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyt���__len__N���s����c���������C���s
���|��i�����S(���se���Return string representation of a set.

        This looks like 'Set([<list of elements>])'.
        (���t���_repr(���R���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyt���__repr__R���s����c���������C���s>���t��|��i�i������}�|�o�|�i����n�d�|��i�i�|�f�S(���Ns���%s(%r)(���t���listR���t���keyst���sortR���t���__name__(���R���t	���sort_themt���elements(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyR
���\���s����c���������C���s
���|��i��i����S(���ss���Return an iterator over the elements or a set.

        This is the keys iterator for the underlying dict.
        (���R���t���iterkeys(���R���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyt���__iter__b���s����c���������C���s���t��d�����d��S(���Ns���can't compare sets using cmp()(���R���(���R���t���other(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyt���__cmp__o���s����c���������C���s)���t��|�t���o�|��i�|�i�j�St�Sd��S(���N(���t
���isinstanceR����R���t���False(���R���R���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyt���__eq__����s����c���������C���s)���t��|�t���o�|��i�|�i�j�St�Sd��S(���N(���R���R����R���t���True(���R���R���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyt���__ne__����s����c���������C���s#���|��i�����}�|�i�i�|��i���|�S(���s���Return a shallow copy of a set.(���R���R���t���update(���R���t���result(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyt���copy����s����c���������C���sc���d�d�k��l�}�|��i����}�|�|�t�|����<|�i�}�t�}�x!�|��D]�}�|�|�|�|�|���<qB�W|�S(���s1���Return a deep copy of a set; used by copy module.i����(���t���deepcopy(���R���R���R���t���idR���R���(���R���t���memoR���R���t���datat���valuet���elt(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyt���__deepcopy__����s����	�c���������C���s"���t��|�t���p�t�S|��i�|���S(���sh���Return the union of two sets as a new set.

        (I.e. all elements that are in either set.)
        (���R���R����t���NotImplementedt���union(���R���R���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyt���__or__����s����c���������C���s ���|��i��|����}�|�i�|���|�S(���sh���Return the union of two sets as a new set.

        (I.e. all elements that are in either set.)
        (���R���t���_update(���R���R���R���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyR&�������s����
c���������C���s"���t��|�t���p�t�S|��i�|���S(���sn���Return the intersection of two sets as a new set.

        (I.e. all elements that are in both sets.)
        (���R���R����R%���t���intersection(���R���R���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyt���__and__����s����c���������C���s���t��|�t���p�t�|���}�n�t�|����t�|���j�o�|��|�}�}�n�|�|��}�}�t�t�|�i�i�|�����}�|��i�|���S(���sn���Return the intersection of two sets as a new set.

        (I.e. all elements that are in both sets.)
        (	���R���R����R���R���t���itert���filterR���t���has_keyR���(���R���R���t���littlet���bigt���common(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyR)�������s����
c���������C���s"���t��|�t���p�t�S|��i�|���S(���s����Return the symmetric difference of two sets as a new set.

        (I.e. all elements that are in exactly one of the sets.)
        (���R���R����R%���t���symmetric_difference(���R���R���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyt���__xor__����s����c������	���C���s����|��i�����}�|�i�}�t�}�|��i�}�y
�|�i�}�Wn"�t�j
�o�t�|���i�}�n�Xx$�t�|�i�|���D]�}�|�|�|�<qi�Wx$�t�|�i�|���D]�}�|�|�|�<q��W|�S(���s����Return the symmetric difference of two sets as a new set.

        (I.e. all elements that are in exactly one of the sets.)
        (���R���R���R���t���AttributeErrorR���t���filterfalseR-���(���R���R���R���R!���R"���t���selfdatat	���otherdataR#���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyR1�������s����		
��c���������C���s"���t��|�t���p�t�S|��i�|���S(���s����Return the difference of two sets as a new Set.

        (I.e. all elements that are in this set and not in the other.)
        (���R���R����R%���t
���difference(���R���R���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyt���__sub__����s����c���������C���sx���|��i�����}�|�i�}�y
�|�i�}�Wn"�t�j
�o�t�|���i�}�n�Xt�}�x$�t�|�i�|����D]�}�|�|�|�<q`�W|�S(���s����Return the difference of two sets as a new Set.

        (I.e. all elements that are in this set and not in the other.)
        (���R���R���R3���R���R���R4���R-���(���R���R���R���R!���R6���R"���R#���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyR7�������s����	
�c���������C���s^���y�|�|��i��j�SWnF�t�j
�o:�t�|�d�d���}�|�d�j�o����n�|����|��i��j�SXd�S(���s{���Report whether an element is a member of a set.

        (Called in response to the expression `element in self'.)
        t���__as_temporarily_immutable__N(���R���R���t���getattrt���None(���R���t���elementt	���transform(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyt���__contains__��s����
c���������C���sP���|��i��|���t�|����t�|���j�o�t�Sx�t�|�i�i�|����D]�}�t�SWt�S(���s-���Report whether another set contains this set.(���t���_binary_sanity_checkR���R���R4���R���R-���R���(���R���R���R#���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyt���issubset��s����
�c���������C���sP���|��i��|���t�|����t�|���j��o�t�Sx�t�|��i�i�|���D]�}�t�SWt�S(���s-���Report whether this set contains another set.(���R?���R���R���R4���R���R-���R���(���R���R���R#���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyt
���issuperset(��s����
�c���������C���s3���|��i��|���t�|����t�|���j��o
�|��i�|���S(���N(���R?���R���R@���(���R���R���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyt���__lt__5��s����
c���������C���s3���|��i��|���t�|����t�|���j�o
�|��i�|���S(���N(���R?���R���RA���(���R���R���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyt���__gt__9��s����
c���������C���s$���t��|�t���p�t�d�����n�d��S(���Ns,���Binary operation only permitted between sets(���R���R����R���(���R���R���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyR?���?��s����c���������C���s+���d�}�x�|��D]�}�|�t��|���N}�q
�W|�S(���Ni����(���t���hash(���R���R���R#���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyt
���_compute_hashE��s
�����c���������C���sG��|��i��}�t�|�t���o�|�i�|�i����d��St�}�t�|���t�t�t�f�j�o��t	�|���}�x��t�op�y#�x�|�D]�}�|�|�|�<qp�Wd��SWq_�t
�j
�o:�t�|�d�d����}�|�d��j�o����n�|�|�|����<q_�Xq_�Wni�xe�|�D]]�}�y�|�|�|�<Wq��t
�j
�o:�t�|�d�d����}�|�d��j�o����n�|�|�|����<q��Xq��Wd��S(���Nt���__as_immutable__(
���R���R���R����R���R���t���typeR���t���tuplet���xrangeR+���R���R:���R;���(���R���t���iterableR!���R"���t���itR<���R=���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyR(���P��s8����	��
�
(#���R���t
���__module__t���__doc__t	���__slots__R���R	���R���t���__str__R���R
���R���R���R���R���R���t���__copy__R$���R'���R&���R*���R)���R2���R1���R8���R7���R>���R@���RA���t���__le__t���__ge__RB���RC���R?���RE���R(���(����(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyR����>���s@���						
																						
				c�����������B���s>���e��Z�d��Z�d�g�Z�d�d���Z�d����Z�d����Z�d����Z�RS(���s���Immutable set class.t	���_hashcodec���������C���s4���d�|��_�h��|��_�|�d�j	�o�|��i�|���n�d�S(���s5���Construct an immutable set from an optional iterable.N(���R;���RS���R���R(���(���R���RJ���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyR���|��s����		
c���������C���s*���|��i��d��j�o�|��i����|��_��n�|��i��S(���N(���RS���R;���RE���(���R���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyt���__hash__���s����c���������C���s���|��i��|��i�f�S(���N(���R���RS���(���R���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyt���__getstate__���s����c���������C���s���|�\�|��_��|��_�d��S(���N(���R���RS���(���R���t���state(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyt���__setstate__���s����N(	���R���RL���RM���RN���R;���R���RT���RU���RW���(����(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyR���u��s���			c�����������B���s����e��Z�d��Z�g��Z�d�d���Z�d����Z�d����Z�d����Z�d����Z	�d����Z
�d����Z�d����Z�d	����Z
�d
����Z�d����Z�d����Z�d
����Z�d����Z�d����Z�d����Z�d����Z�d����Z�d����Z�d����Z�RS(���s��� Mutable set class.c���������C���s+���h��|��_��|�d�j	�o�|��i�|���n�d�S(���s*���Construct a set from an optional iterable.N(���R���R;���R(���(���R���RJ���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyR������s����	
c���������C���s
���|��i��f�S(���N(���R���(���R���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyRU������s����c���������C���s���|�\�|��_��d��S(���N(���R���(���R���R!���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyRW������s����c���������C���s���t��d�����d�S(���s���A Set cannot be hashed.s'���Can't hash a Set, only an ImmutableSet.N(���R���(���R���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyRT������s����c���������C���s$���|��i��|���|��i�i�|�i���|��S(���s2���Update a set with the union of itself and another.(���R?���R���R���(���R���R���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyt���__ior__���s����
c���������C���s���|��i��|���d�S(���s2���Update a set with the union of itself and another.N(���R(���(���R���R���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyt���union_update���s����c���������C���s!���|��i��|���|��|�@i�|��_�|��S(���s9���Update a set with the intersection of itself and another.(���R?���R���(���R���R���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyt���__iand__���s����
c���������C���s7���t��|�t���o�|��|�M}��n�|��i�|���i�|��_�d�S(���s9���Update a set with the intersection of itself and another.N(���R���R����R)���R���(���R���R���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyt���intersection_update���s����c���������C���s���|��i��|���|��i�|���|��S(���sA���Update a set with the symmetric difference of itself and another.(���R?���t���symmetric_difference_update(���R���R���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyt���__ixor__���s����

c���������C���s����|��i��}�t�}�t�|�t���p�t�|���}�n�|��|�j�o�|��i����n�x0�|�D](�}�|�|�j�o�|�|�=qQ�|�|�|�<qQ�Wd�S(���sA���Update a set with the symmetric difference of itself and another.N(���R���R���R���R����R���t���clear(���R���R���R!���R"���R#���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyR\������s����	
�
c���������C���s���|��i��|���|��i�|���|��S(���s1���Remove all elements of another set from this set.(���R?���t���difference_update(���R���R���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyt���__isub__���s����

c���������C���sl���|��i��}�t�|�t���p�t�|���}�n�|��|�j�o�|��i����n�x!�t�|�i�|���D]
�}�|�|�=qW�Wd�S(���s1���Remove all elements of another set from this set.N(���R���R���R����R���R^���R,���R-���(���R���R���R!���R#���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyR_������s����	
�c���������C���s���|��i��|���d�S(���s9���Add all values from an iterable (such as a list or file).N(���R(���(���R���RJ���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyR������s����c���������C���s���|��i��i����d�S(���s"���Remove all elements from this set.N(���R���R^���(���R���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyR^������s����c���������C���sa���y�t��|��i�|�<WnI�t�j
�o=�t�|�d�d���}�|�d�j�o����n�t��|��i�|����<n�Xd�S(���s`���Add an element to a set.

        This has no effect if the element is already present.
        RF���N(���R���R���R���R:���R;���(���R���R<���R=���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyt���add���s����
c���������C���s[���y�|��i��|�=WnF�t�j
�o:�t�|�d�d���}�|�d�j�o����n�|��i��|����=n�Xd�S(���sv���Remove an element from a set; it must be a member.

        If the element is not a member, raise a KeyError.
        R9���N(���R���R���R:���R;���(���R���R<���R=���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyt���remove���s����
c���������C���s+���y�|��i��|���Wn�t�j
�o�n�Xd�S(���sm���Remove an element from a set if it is a member.

        If the element is not a member, do nothing.
        N(���Rb���t���KeyError(���R���R<���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyt���discard
��s����c���������C���s���|��i��i����d�S(���s+���Remove and return an arbitrary set element.i����(���R���t���popitem(���R���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyt���pop��s����c���������C���s
���t��|����S(���N(���R���(���R���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyRF�����s����c���������C���s
���t��|����S(���N(���t���_TemporarilyImmutableSet(���R���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyR9�����s����N(���R���RL���RM���RN���R;���R���RU���RW���RT���RX���RY���RZ���R[���R]���R\���R`���R_���R���R^���Ra���Rb���Rd���Rf���RF���R9���(����(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyR������s,���			
											
	
	
		Rg���c�����������B���s���e��Z�d�����Z�d����Z�RS(���c���������C���s���|�|��_��|�i�|��_�d��S(���N(���t���_setR���(���R���t���set(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyR���(��s����	c���������C���s
���|��i��i����S(���N(���Rh���RE���(���R���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyRT���,��s����(���R���RL���R���RT���(����(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyRg���$��s���	(���RM���t���__all__t���objectR����R���R���Rg���(����(����(����s;���install/lib/scons-2.0.0.final.0/SCons/compat/_scons_sets.pyt���<module>)���s�����8�