<s> import logging <EOL> import memcache <EOL> __all__ = [ '<STR_LIT>' ] <EOL> LOG = logging . getLogger ( __name__ ) <EOL> LOG . addHandler ( logging . NullHandler ( ) ) <EOL> class MemcacheClient : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , servers , dead_retry = <NUM_LIT:0> , socket_timeout = <NUM_LIT:0.5> , <EOL> server_max_value_length = <NUM_LIT> * <NUM_LIT> ) : <EOL> self . servers = servers <EOL> self . dead_retry = dead_retry <EOL> self . socket_timeout = socket_timeout <EOL> self . server_max_value_length = server_max_value_length <EOL> self . _client = memcache . Client ( <EOL> servers = self . servers , <EOL> dead_retry = self . dead_retry , <EOL> socket_timeout = self . socket_timeout , <EOL> server_max_value_length = self . server_max_value_length ) <EOL> def set ( self , * args , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> try : <EOL> return self . _client . set ( * args , ** kwargs ) <EOL> except Exception as e : <EOL> return int ( <NUM_LIT:0> ) <EOL> def get ( self , * args , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> try : <EOL> return self . _client . get ( * args , ** kwargs ) <EOL> except Exception as e : <EOL> return None </s>
