# ``twisted`.`mail`.`_pop3client`.`_ListSetter``

class documentation

`class _ListSetter: (source)`

View In Hierarchy

A utility class to construct a list from a multi-line response accounting for deleted messages.

POP3 responses sometimes occur in the form of a list of lines containing two pieces of data, a message index and a value of some sort. When a message is deleted, it is omitted from these responses. The `setitem` method of this class is meant to be called with these two values. In the cases where indices are skipped, it takes care of padding out the missing values with `None`.

Method | `__init__` |
Method | `setitem` | Add the value at the specified position, padding out missing entries.
Instance Variable | `L` | See `__init__`

def __init__(self, L): (source)

Parameters
L:`list` of `object` | The list being constructed. An empty list should be passed in.

def setitem(self, itemAndValue): (source)
Add the value at the specified position, padding out missing entries.

Parameters
itemAndValue:`tuple` | A tuple of (item, value). The item is the 0-based index in the list at which the value should be placed. The value is is an `object` to put in the list.

L = (source)
See `__init__`