def parse_debug_object(response):
 response = nativestr(response)
 response = ('type:' + response)
 response = dict([kv.split(':') for kv in response.split()])
 int_fields = ('refcount', 'serializedlength', 'lru', 'lru_seconds_idle')
 for field in int_fields:
  if (field in response):
   response[field] = int(response[field])
 return response

def parse_debug_object ( response ) : response = nativestr ( response ) response = ( 'type:' + response ) response = dict ( [ kv . split ( ':' ) for kv in response . split ( ) ] ) int_fields = ( 'refcount' , 'serializedlength' , 'lru' , 'lru_seconds_idle' ) for field in int_fields : if ( field in response ) : response [ field ] = int ( response [ field ] ) return response
parse the results of rediss debug object command into a python dict .