#NEWLINE# def push( self , key , value , tail = False , no_create = False ) : #NEWLINE# #INDENT# '\n        @param key Redis key\n        @param value String element of list\n\n        Add the string value to the head (LPUSH/LPUSHX) or tail\n        (RPUSH/RPUSHX) of the list stored at key key. If the key does\n        not exist and no_create is False (the default) an empty list\n        is created just before the append operation. If the key exists\n        but is not a List an error is returned.\n\n        @note Time complexity: O(1)\n        ' #NEWLINE# if tail : #NEWLINE# #INDENT# if no_create : #NEWLINE# #INDENT# return self . rpushx ( key , value ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return self . rpush ( key , value ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if no_create : #NEWLINE# #INDENT# return self . lpushx ( key , value ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return self . lpush ( key , value )