@@ -392,7 +392,16 @@ def flush_schema(self):
392
392
self .schema .flush ()
393
393
self .load_schema ()
394
394
395
- def call (self , func_name , * args ):
395
+ def _build_call_request (self , func_name , args , kwargs ):
396
+ assert isinstance (func_name , str )
397
+
398
+ # This allows to use a tuple or list as an argument
399
+ if len (args ) == 1 and isinstance (args [0 ], (list , tuple )):
400
+ args = args [0 ]
401
+
402
+ return RequestCall (self , func_name , args , self .call_16 )
403
+
404
+ def call (self , func_name , * args , ** kwargs ):
396
405
'''
397
406
Execute CALL request. Call stored Lua function.
398
407
@@ -403,15 +412,8 @@ def call(self, func_name, *args):
403
412
404
413
:rtype: `Response` instance
405
414
'''
406
- assert isinstance (func_name , str )
407
-
408
- # This allows to use a tuple or list as an argument
409
- if len (args ) == 1 and isinstance (args [0 ], (list , tuple )):
410
- args = args [0 ]
411
-
412
- request = RequestCall (self , func_name , args , self .call_16 )
413
- response = self ._send_request (request )
414
- return response
415
+ request = self ._build_call_request (func_name , args , kwargs )
416
+ return self ._send_request (request )
415
417
416
418
def eval (self , expr , * args ):
417
419
'''
0 commit comments