#NEWLINE# def hgetall( self , key ) : #NEWLINE# #INDENT# '\n        Returns all fields and values of the hash stored at key. In the\n        returned value, every field name is followed by its value, so the\n        length of the reply is twice the size of the hash.\n        ' #NEWLINE# self . _send ( 'HGETALL' , key ) #NEWLINE# def post_process( key_vals ) : #NEWLINE# #INDENT# res = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# i = 0 #NEWLINE# while ( i < ( len ( key_vals ) - 1 ) ) : #NEWLINE# #INDENT# res [ key_vals [ i ] ] = key_vals [ ( i + 1 ) ] #NEWLINE# i += 2 #NEWLINE# #UNINDENT# return res #NEWLINE# #UNINDENT# return self . getResponse ( ) . addCallback ( post_process )