How to use the namedlist.FACTORY function in namedlist

To help you get started, we’ve selected a few namedlist examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gurnec / Undo_FFG / namedlist.py View on Github external
def _get_values(fields, args):
    # Returns [(fieldname, value)]. If the value is a FACTORY, call it.
    assert len(fields) == len(args)
    return [(fieldname, (value._callable() if isinstance(value, FACTORY) else value))
            for fieldname, value in zip(fields, args)]

namedlist

Similar to namedtuple, but instances are mutable.

Apache-2.0
Latest version published 4 years ago

Package Health Score

46 / 100
Full package analysis

Similar packages