Skip to content

Impossible to separate multiple arguments on call objects #113

Description

@staticdev

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions