#NEWLINE# def update( self , * args , **kwargs ) : #NEWLINE# #INDENT# sources = [ ] #NEWLINE# if ( len ( args ) == 1 ) : #NEWLINE# #INDENT# if hasattr ( args [ 0 ] , 'iteritems' ) : #NEWLINE# #INDENT# sources . append ( args [ 0 ] . iteritems ( ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# sources . append ( iter ( args [ 0 ] ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if args : #NEWLINE# #INDENT# raise TypeError ( 'expected at most one positional argument' ) #NEWLINE# #UNINDENT# #UNINDENT# if kwargs : #NEWLINE# #INDENT# sources . append ( kwargs . iteritems ( ) ) #NEWLINE# #UNINDENT# for iterable in sources : #NEWLINE# #INDENT# for ( key , val ) in iterable : #NEWLINE# #INDENT# self [ key ] = val