t.m.i.MessageSet(object) : class documentation

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

Essentially an infinite bitfield, with some extra features.
Instance Variable getnext A 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)
Method __init__ Create a new MessageSet()
Method last Undocumented
Method add Add another range
Method __add__ Undocumented
Method extend Undocumented
Method clean Clean ranges list, combining adjacent ranges
Method __contains__ May raise TypeError if we encounter an open-ended range
Method __iter__ Undocumented
Method __len__ Undocumented
Method __str__ Undocumented
Method __repr__ Undocumented
Method __eq__ Undocumented
Method _iterator Undocumented
getnext =
A 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)
def __init__(self, start=_empty, end=_empty): (source)
Create a new MessageSet()
ParametersstartStart of range, or only message number (type: Optional int)
endEnd of range. (type: Optional int)
def last(): (source)
Undocumented
def add(self, start, end=_empty): (source)
Add another range
ParametersstartStart of range, or only message number (type: int)
endEnd of range. (type: Optional int)
def __add__(self, other): (source)
Undocumented
def extend(self, other): (source)
Undocumented
def clean(self): (source)
Clean ranges list, combining adjacent ranges
def __contains__(self, value): (source)
May raise TypeError if we encounter an open-ended range
def _iterator(self): (source)
Undocumented
def __iter__(self): (source)
Undocumented
def __len__(self): (source)
Undocumented
def __str__(self): (source)
Undocumented
def __repr__(self): (source)
Undocumented
def __eq__(self, other): (source)
Undocumented
API Documentation for Twisted, generated by pydoctor at 2014-05-12 18:27:00.