Closed andre2007 closed 3 years ago
For the method sqs.get_queue_url
(https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sqs.html#SQS.Client.get_queue_url)
only key arguments are allowed as it is defined as get_queue_url(**kwargs)
Running ./pydsample pyd.exception.PythonException@/home/user/.dub/packages/pyd-0.13.1/pyd/infrastructure/pyd/pydobject.d(544): TypeError: get_queue_url() only accepts keyword arguments.
looks like the PydObject has a unpack_call(PydObject args, PydObject kwargs) method
@ariovistus do you know by chance how I can create a kwargs PydObject? Can I create it based on a tuple (https://dlang.org/phobos/std_typecons.html#.Tuple)?
unpack_call is going to correspond to a python call like
method(*args, **kwargs)
so kwargs needs to be a python dict. something like
PydObject kwargs = py(["region_name":"eu-central-1"]);
Thanks.
Is there any support of named arguments in pyd? I have following python call, I would like to translate to D
(In this specific case,
region_name
is also the second positional argument of the method, but what would I do, if it would be the 12th positional argument?)