Class t.m.i.MessageSet(object):

Part of twisted.mail.imap4 View Source View In Hierarchy

Essentially an infinite bitfield, with some extra features.
Instance VariablesgetnextA function that returns the next message number, used when iterating through the MessageSet. By default, a function returning the next integer is supplied, but as this can be rather inefficient for sparse UID iterations, it is recommended to supply one when messages are requested by UID. The argument is provided as a hint to the implementation and may be ignored if it makes sense to do so (eg, if an iterator is being used that maintains its own state, it is guaranteed that it will not be called out-of-order). (type: Function taking int returning int )
Line # Kind Name Docs
73 Method __init__ Create a new MessageSet()
98 Method last Undocumented
126 Method add Add another range
154 Method __add__ Undocumented
166 Method extend Undocumented
178 Method clean Clean ranges list, combining adjacent ranges
200 Method __contains__ May raise TypeError if we encounter unknown "high" values
213 Method _iterator Undocumented
222 Method __iter__ Undocumented
228 Method __len__ Undocumented
237 Method __str__ Undocumented
251 Method __repr__ Undocumented
254 Method __eq__ Undocumented
def __init__(self, start=_empty, end=_empty):
Create a new MessageSet()
ParametersstartStart of range, or only message number (type: Optional int )
endEnd of range. (type: Optional int )
def last():
Undocumented
def add(self, start, end=_empty):
Add another range
ParametersstartStart of range, or only message number (type: int )
endEnd of range. (type: Optional int )
def __add__(self, other):
Undocumented
def extend(self, other):
Undocumented
def clean(self):
Clean ranges list, combining adjacent ranges
def __contains__(self, value):
May raise TypeError if we encounter unknown "high" values
def _iterator(self):
Undocumented
def __iter__(self):
Undocumented
def __len__(self):
Undocumented
def __str__(self):
Undocumented
def __repr__(self):
Undocumented
def __eq__(self, other):
Undocumented