def __init__(self, *args, **kw):
super(IndexDict, self).__init__()<EOL>if args:<EOL><INDENT>for key, value in args[<NUM_LIT:0>]:<EOL><INDENT>IndexDict_check_key_type(key)<EOL>self[key] = value<EOL><DEDENT><DEDENT>self.update(**kw)<EOL>
check key is valid