+
+ def expire(self, name, time):
+ """
+ >>> r = Redis(db=9)
+ >>> r.set('a', 1)
+ 'OK'
+ >>> r.expire('a', 1)
+ 1
+ >>> r.expire('zzzzz', 1)
+ 0
+ >>>
+ """
+ self.connect()
+ self._write('EXPIRE %s %s\r\n' % (name, time))
+ return self.get_response()