#NEWLINE# def _check_keys( self , keys ) : #NEWLINE# #INDENT# for key in keys : #NEWLINE# #INDENT# if ( not isinstance ( key , str ) ) : #NEWLINE# #INDENT# raise MemcacheError ( 'Key must be string and not unicode or anything else' ) #NEWLINE# #UNINDENT# if ( len ( key ) > MemcacheTextProtocol . MAX_KEY_LENGTH ) : #NEWLINE# #INDENT# raise MemcacheError ( ( 'Key is bigger then %d' % MemcacheTextProtocol . MAX_KEY_LENGTH ) ) #NEWLINE# #UNINDENT# for c in key : #NEWLINE# #INDENT# if ( ( ord ( key ) < 33 ) or ( ord ( c ) == 127 ) ) : #NEWLINE# #INDENT# raise MemcacheError ( 'Key contains whitespace or control characters' )