Skip to content

Should (x,) produce a 1-element tuple? #1987

@MasonMcGill

Description

@MasonMcGill

It currently doesn't (it just produces x), but this would be helpful. Currently, generic routines that build tuples don't have to choose between

  1. failing when they should produce 1-element tuples.
  2. producing tuples with named elements that are now incompatible with other tuples (see abb7381).

This parsing also seems to be consistent with the grammar. The relevant snippet:

tupleConstr = '(' optInd (exprColonEqExpr comma?)* optPar ')'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions