DictPrintingInOrderIgnoringNone

class poisson_approval.DictPrintingInOrderIgnoringNone[source]

A dictionary that prints in the order of the keys, ignoring value None (or iterables containing only None).

Examples

>>> d = DictPrintingInOrderIgnoringNone({'b': 'x', 'a': 'y', 'c': 'z', 'd': 0, 'e': None, 'f': [None, None]})
>>> print(d)
{a: y, b: x, c: z, d: 0}
>>> print(repr(d))
{'a': 'y', 'b': 'x', 'c': 'z', 'd': 0}