Skip to content

Assigning from tuples #2

@mklingen

Description

@mklingen

The following expression does not work:

function f(a, b)
{
    return (a + b, a * b);
}

print f(1, 2);

It gives the error:

line 3:17 mismatched input u',' expecting ')'
line 3:21 no viable alternative at input u'*'
line 3:24 extraneous input u')' expecting ';'

Similarly, this:

x = (1, 2);

gives the error:

line 1:6 missing ')' at u','
line 1:8 no viable alternative at input u'2'

What's the proper way of dealing with tuples in cpy?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions