#NEWLINE# def validate_string_dict( dct ) : #NEWLINE# #INDENT# 'Validate that the input is a dict with string keys and values.\n\n    Raises ValueError if not.' #NEWLINE# for ( k , v ) in iteritems ( dct ) : #NEWLINE# #INDENT# if ( not isinstance ( k , string_types ) ) : #NEWLINE# #INDENT# raise ValueError ( ( 'key %r in dict must be a string' % k ) ) #NEWLINE# #UNINDENT# if ( not isinstance ( k , string_types ) ) : #NEWLINE# #INDENT# raise ValueError ( ( 'value %r in dict must be a string' % v ) )