rivescript-python icon indicating copy to clipboard operation
rivescript-python copied to clipboard

Impossible to separate multiple arguments on call objects

Open staticdev opened this issue 7 years ago • 0 comments

Is there a way to separate the content from star1 and star2 in args?

> object test_case python
    return str(args)
< object

+ do you know (my way|your way) of doing *
- <call>test_case <star1> <star2></call> 

Question: Do you know my way of doing computer programming? Answer: [‘my’, ‘way’, ‘computer’, ‘programming’]

If the answer is no, I propose an enhancement by creating args1, args2…, like in other parts of Rivescript.

Then the code would be something like:

> object test_case python
    if ' '.join(args1) == 'my way':
        return 'Of course not, it is your way of doing ' + ' '.join(args2)
    # your way
    else:
        return 'Another crazy answer..'
< object 

Answer: Of course not, it is your way of doing computer programming.

staticdev avatar Nov 24 '17 15:11 staticdev