def __init__(self, mapping_or_iterable=None, **kwargs):
self.items_dict = {}<EOL>if mapping_or_iterable is not None:<EOL><INDENT>if type(mapping_or_iterable) is dict:<EOL><INDENT>mapping_or_iterable = mapping_or_iterable.items()<EOL><DEDENT>for kv in mapping_or_iterable:<EOL><INDENT>if len(kv) != <NUM_LIT:2>:<EOL><INDENT>raise Exception('<STR_LIT>'.format(kv))<EOL><DEDENT>self[kv[<NUM_LIT:0>]] = kv[<NUM_LIT:1>]<EOL><DEDENT><DEDENT>for keys, value in kwargs.items():<EOL><INDENT>self[keys] = value<EOL><DEDENT>
Initializes dictionary from an optional positional argument and a possibly empty set of keyword arguments.