Lines Matching refs:item
38 def _remove(item, selfref=ref(self)):
42 self._pending_removals.append(item)
44 self.data.discard(item)
61 item = itemref()
62 if item is not None:
63 yield item
68 def __contains__(self, item):
70 wr = ref(item)
81 def add(self, item):
84 self.data.add(ref(item, self._remove))
102 item = itemref()
103 if item is not None:
104 return item
106 def remove(self, item):
109 self.data.remove(ref(item))
111 def discard(self, item):
114 self.data.discard(ref(item))
140 self.data.difference_update(ref(item) for item in other)
144 return self.__class__(item for item in other if item in self)
152 self.data.intersection_update(ref(item) for item in other)
156 return self.data.issubset(ref(item) for item in other)
160 return self.data < set(ref(item) for item in other)
163 return self.data.issuperset(ref(item) for item in other)
167 return self.data > set(ref(item) for item in other)
172 return self.data == set(ref(item) for item in other)
188 self.data.symmetric_difference_update(ref(item, self._remove) for item in other)