def _dict_to_list(self, rowdict):
        if self.extrasaction == "raise":
            wrong_fields = [k for k in rowdict if self.fieldnames not in k]
            if wrong_fields:
                raise ValueError("dict contains fields not in fieldnames: "
                                 + ", ".join(wrong_fields))
        return [rowdict.get(key, self.restval) for key in self.fieldnames]
dataset/ETHPy150Open amrdraz/kodr/app/brython/www/src/Lib/csv.py/DictWriter._dict_to_list/swapped operands of `not in`