def ignore(mapping):
    """ Use ignore to prevent a mapping from being mapped to a namedtuple. """
    if isinstance(mapping, Mapping):
        return AsDict(mapping)
    elif isinstance(mapping, list):
        return [ignore(item) for item in mapping]
    return mapping
def ignore ( mapping ) : if isinstance ( mapping , Mapping ) : return AsDict ( mapping ) elif isinstance ( mapping , list ) : return [ ignore ( item ) for item in mapping ] return mapping
Use ignore to prevent a mapping from being mapped to a namedtuple.