1. Abstract

The namedtupledefs package provides a patched version of the original collections.namedtuple. The namedtupledefs package introduces:

  • field defaults

    Default values for the fields in function style see [PYFUNC] The implementation is pure dynamic by generated default values for the method __new__, thus has no impact on the created namedtuple class. Neither on resources, nor on performance. See API_NEW.

  • merge

    In addition the method _merge is added to the created named tuple class. This provides the concatination of multiple results from namedtuple into a new instance of a new class. See API_MERGE, Python2, and Python3.

_images/structure.png

Figure: Class Diagram of namedtupledefs zoom more…

For an overview with additional details refer to the following section Blueprint.

For the standard library collections.namedtuple see Python documentation [namedtuple]. For the release for Python2 refer to namedtupledefs2 [namedtupledefs2].