144 class IDict(IDictInfo, IDictWriter): |
144 class IDict(IDictInfo, IDictWriter): |
145 """Marker interface for dict-like components""" |
145 """Marker interface for dict-like components""" |
146 |
146 |
147 |
147 |
148 # |
148 # |
|
149 # Generic set interfaces |
|
150 # |
|
151 |
|
152 class ISetInfo(Interface): |
|
153 """Set-like interfaces""" |
|
154 |
|
155 def copy(self, *args, **kwargs): |
|
156 """ Return a shallow copy of a set. """ |
|
157 |
|
158 def difference(self, *args, **kwargs): |
|
159 """Return the difference of two or more sets as a new set""" |
|
160 |
|
161 def intersection(self, *args, **kwargs): |
|
162 """Return the intersection of two or more sets as a new set""" |
|
163 |
|
164 def isdisjoint(self, *args, **kwargs): |
|
165 """ Return True if two sets have a null intersection. """ |
|
166 |
|
167 def issubset(self, *args, **kwargs): |
|
168 """ Report whether another set contains this set. """ |
|
169 |
|
170 def issuperset(self, *args, **kwargs): |
|
171 """ Report whether this set contains another set. """ |
|
172 |
|
173 def symmetric_difference(self, *args, **kwargs): |
|
174 """Return the symmetric difference of two sets as a new set""" |
|
175 |
|
176 def union(self, *args, **kwargs): |
|
177 """Return the union of sets as a new set""" |
|
178 |
|
179 def __and__(self, y): |
|
180 """ x.__and__(y) <==> x&y """ |
|
181 |
|
182 def __cmp__(self, y): |
|
183 """ x.__cmp__(y) <==> cmp(x,y) """ |
|
184 |
|
185 def __contains__(self, y): |
|
186 """ x.__contains__(y) <==> y in x. """ |
|
187 |
|
188 def __eq__(self, y): |
|
189 """ x.__eq__(y) <==> x==y """ |
|
190 |
|
191 def __getattribute__(self, name): |
|
192 """ x.__getattribute__('name') <==> x.name """ |
|
193 |
|
194 def __ge__(self, y): |
|
195 """ x.__ge__(y) <==> x>=y """ |
|
196 |
|
197 def __gt__(self, y): |
|
198 """ x.__gt__(y) <==> x>y """ |
|
199 |
|
200 def __hash__(self): |
|
201 """Compute hash value""" |
|
202 |
|
203 def __iter__(self): |
|
204 """ x.__iter__() <==> iter(x) """ |
|
205 |
|
206 def __len__(self): |
|
207 """ x.__len__() <==> len(x) """ |
|
208 |
|
209 def __le__(self, y): # real signature unknown; restored from __doc__ |
|
210 """ x.__le__(y) <==> x<=y """ |
|
211 |
|
212 def __lt__(self, y): # real signature unknown; restored from __doc__ |
|
213 """ x.__lt__(y) <==> x<y """ |
|
214 |
|
215 def __ne__(self, y): # real signature unknown; restored from __doc__ |
|
216 """ x.__ne__(y) <==> x!=y """ |
|
217 |
|
218 def __or__(self, y): # real signature unknown; restored from __doc__ |
|
219 """ x.__or__(y) <==> x|y """ |
|
220 |
|
221 def __reduce__(self, *args, **kwargs): # real signature unknown |
|
222 """ Return state information for pickling. """ |
|
223 |
|
224 def __repr__(self): # real signature unknown; restored from __doc__ |
|
225 """ x.__repr__() <==> repr(x) """ |
|
226 |
|
227 def __rand__(self, y): |
|
228 """ x.__rand__(y) <==> y&x """ |
|
229 |
|
230 def __ror__(self, y): |
|
231 """ x.__ror__(y) <==> y|x """ |
|
232 |
|
233 def __rsub__(self, y): |
|
234 """ x.__rsub__(y) <==> y-x """ |
|
235 |
|
236 def __rxor__(self, y): |
|
237 """ x.__rxor__(y) <==> y^x """ |
|
238 |
|
239 def __sizeof__(self): |
|
240 """ S.__sizeof__() -> size of S in memory, in bytes """ |
|
241 |
|
242 def __sub__(self, y): |
|
243 """ x.__sub__(y) <==> x-y """ |
|
244 |
|
245 def __xor__(self, y): |
|
246 """ x.__xor__(y) <==> x^y """ |
|
247 |
|
248 |
|
249 class ISetWriter(Interface): |
|
250 """Set-like writer interface""" |
|
251 |
|
252 def add(self, *args, **kwargs): |
|
253 """Add an element to set""" |
|
254 |
|
255 def clear(self, *args, **kwargs): |
|
256 """ Remove all elements from this set. """ |
|
257 |
|
258 def difference_update(self, *args, **kwargs): |
|
259 """ Remove all elements of another set from this set. """ |
|
260 |
|
261 def discard(self, *args, **kwargs): |
|
262 """Remove an element from a set if it is a member""" |
|
263 |
|
264 def intersection_update(self, *args, **kwargs): |
|
265 """ Update a set with the intersection of itself and another. """ |
|
266 |
|
267 def pop(self, *args, **kwargs): |
|
268 """Remove and return an arbitrary set element""" |
|
269 |
|
270 def remove(self, *args, **kwargs): |
|
271 """Remove an element from a set; it must be a member""" |
|
272 |
|
273 def symmetric_difference_update(self, *args, **kwargs): |
|
274 """ Update a set with the symmetric difference of itself and another """ |
|
275 |
|
276 def update(self, *args, **kwargs): |
|
277 """ Update a set with the union of itself and others. """ |
|
278 |
|
279 def __iand__(self, y): |
|
280 """ x.__iand__(y) <==> x&=y """ |
|
281 |
|
282 def __ior__(self, y): |
|
283 """ x.__ior__(y) <==> x|=y """ |
|
284 |
|
285 def __isub__(self, y): |
|
286 """ x.__isub__(y) <==> x-=y """ |
|
287 |
|
288 def __ixor__(self, y): |
|
289 """ x.__ixor__(y) <==> x^=y """ |
|
290 |
|
291 |
|
292 class ISet(ISetInfo, ISetWriter): |
|
293 """Marker interface for set-like components""" |
|
294 |
|
295 |
|
296 # |
149 # ZEO connection settings interface |
297 # ZEO connection settings interface |
150 # |
298 # |
151 |
299 |
152 class IZEOConnection(Interface): |
300 class IZEOConnection(Interface): |
153 """ZEO connection settings interface""" |
301 """ZEO connection settings interface""" |