equal
deleted
inserted
replaced
2701 the value when asked for membership and the element is not contained |
2701 the value when asked for membership and the element is not contained |
2702 |
2702 |
2703 This class does not duck-type baseset and it's only supposed to be used |
2703 This class does not duck-type baseset and it's only supposed to be used |
2704 internally |
2704 internally |
2705 """ |
2705 """ |
|
2706 |
|
2707 def __init__(self, gen): |
|
2708 super(_ascgeneratorset, self).__init__(gen, iterasc=True) |
|
2709 |
2706 def __contains__(self, x): |
2710 def __contains__(self, x): |
2707 if x in self._cache: |
2711 if x in self._cache: |
2708 return self._cache[x] |
2712 return self._cache[x] |
2709 |
2713 |
2710 # Use new values only, as existing values would be cached. |
2714 # Use new values only, as existing values would be cached. |
2724 the value when asked for membership and the element is not contained |
2728 the value when asked for membership and the element is not contained |
2725 |
2729 |
2726 This class does not duck-type baseset and it's only supposed to be used |
2730 This class does not duck-type baseset and it's only supposed to be used |
2727 internally |
2731 internally |
2728 """ |
2732 """ |
|
2733 |
|
2734 def __init__(self, gen): |
|
2735 super(_descgeneratorset, self).__init__(gen, iterasc=False) |
|
2736 |
2729 def __contains__(self, x): |
2737 def __contains__(self, x): |
2730 if x in self._cache: |
2738 if x in self._cache: |
2731 return self._cache[x] |
2739 return self._cache[x] |
2732 |
2740 |
2733 # Use new values only, as existing values would be cached. |
2741 # Use new values only, as existing values would be cached. |