Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to separate multiple arguments on call objects #113

Open
staticdev opened this issue Nov 24, 2017 · 0 comments
Open

Impossible to separate multiple arguments on call objects #113

staticdev opened this issue Nov 24, 2017 · 0 comments

Comments

@staticdev
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant