l.a.i.IndexStanzaFields : class documentation

Part of lp.archivepublisher.indices View In Hierarchy

Store and format ordered Index Stanza fields.
Method __init__ Undocumented
Method append Append an (field, value) tuple to the internal list.
Method extend Extend the internal list with the key-value pairs in entries.
Method makeOutput Return a line-by-line aggregation of appended fields.
def __init__(self):
Undocumented
def append(self, name, value):
Append an (field, value) tuple to the internal list.

Then we can use the FIFO-like behaviour in makeOutput().

def extend(self, entries):
Extend the internal list with the key-value pairs in entries.
def makeOutput(self):
Return a line-by-line aggregation of appended fields.

Empty fields values will cause the exclusion of the field. The output order will preserve the insertion order, FIFO.

API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.