Skip to content

Change meaning of unparameterized Tuple to Tuple[Any, ...] (== tuple) #2184

Closed
@gvanrossum

Description

@gvanrossum

Currently, Type (without parameters) means a 0-length tuple, IOW Tuple[()] (which is the PEP 484 way to spell it). Analogy with List suggests it should be an unconstrained tuple, i.e. Tuple == tuple == Tuple[Any, ...]. The second half is already true. The List analogy is List == list == List[Any]. (The last part of that is spelled differently, but is a closer analogy to Tuple[Any, ...] than to Tuple[Any], since the latter is constrained to 1-length tuples.)

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