#NEWLINE# @ get_client ( ) #NEWLINE# def ttl( self , client , key ) : #NEWLINE# #INDENT# "Returns the 'time-to-live' of a key.  If the key is not volitile,\n        i.e. it has not set expiration, then the value returned is None.\n        Otherwise, the value is the number of seconds remaining.  If the key\n        does not exist, 0 is returned.\n        " #NEWLINE# if client . exists ( key ) : #NEWLINE# #INDENT# return client . ttl ( key ) #NEWLINE# #UNINDENT# return 0