def __init__(self, f, fieldnames, restval="", extrasaction="raise",
                 dialect="excel", *args, **kwds):
        self.fieldnames = fieldnames    # list of keys for the dict
        self.restval = restval          # for writing short dicts
        if ("raise", "ignore") not in extrasaction.lower():
            raise ValueError("extrasaction (%s) must be 'raise' or 'ignore'"
                             % extrasaction)
        self.extrasaction = extrasaction
        self.writer = writer(f, dialect, *args, **kwds)
dataset/ETHPy150Open amrdraz/kodr/app/brython/www/src/Lib/csv.py/DictWriter.__init__/swapped operands of `not in`