for every f in fields, if exclude is false, or if exclude is true and f is not contained in exclude, and only if f is not in ignored,
field_dict = OrderedDict ( [ ( f , field_dict . get ( f ) ) for f in fields if ( ( not exclude ) or ( exclude and f not in exclude ) ) and ( f not in ignored ) ] )