#NEWLINE# def rpoplpush( self , srckey , dstkey ) : #NEWLINE# #INDENT# '\n        @param srckey key of list to pop tail element of\n        @param dstkey key of list to push to\n\n        Atomically return and remove the last (tail) element of the srckey\n        list, and push the element as the first (head) element of the\n        dstkey list. For example if the source list contains the elements\n        "a","b","c" and the destination list contains the elements\n        "foo","bar" after an RPOPLPUSH command the content of the two lists\n        will be "a","b" and "c","foo","bar".\n        If the key does not exist or the list is already empty the special\n        value \'nil\' is returned. If the srckey and dstkey are the same the\n        operation is equivalent to removing the last element from the list\n        and pusing it as first element of the list, so it\'s a "list\n        rotation" command.\n\n        Programming patterns: safe queues\n        Redis lists are often used as queues in order to exchange messages\n        between different programs. A program can add a message performing\n        an LPUSH operation against a Redis list (we call this program a\n        Producer), while another program (that we call Consumer)\n        can process the messages performing an RPOP command in\n        order to start reading the messages from the oldest.\n        Unfortunately if a Consumer crashes just after an RPOP\n        operation the message gets lost. RPOPLPUSH solves this\n        problem since the returned message is added to another\n        "backup" list. The Consumer can later remove the message\n        from the backup list using the LREM command when the\n        message was correctly processed.\n        Another process, called Helper, can monitor the "backup"\n        list to check for timed out entries to repush against the\n        main queue.\n\n        Programming patterns: server-side O(N) list traversal\n        Using RPOPPUSH with the same source and destination key a\n        process can visit all the elements of an N-elements List in\n        O(N) without to transfer the full list from the server to\n        the client in a single LRANGE operation. Note that a\n        process can traverse the list even while other processes\n        are actively RPUSHing against the list, and still no\n        element will be skipped.\n        Return value\n\n        Bulk reply\n        ' #NEWLINE# self . _send ( 'RPOPLPUSH' , self , dstkey ) #NEWLINE# return self . getResponse ( )