Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upMultiple types for variable-length Tuples #692
Comments
|
Supporting at least the subset of types of the form I see at least one weak use in DSL design: writing values of the allowed type It can be argued that if tuple concatenation types for the tuple types postulated today, will become typable in e. g. MyPy or other major typecheckers, then the proposed kind of tuples may be a pain to cover. |
|
Thanks @arseniiv . Just to add to this, my use case is a function in a class which returns a |
After #30 is supported, it would be great if variable-length Tuples would also work with multiple types.
For example, a Tuple with a string and zero or more ints inside could look like this:
Tuple[str, int, ...]
which currently can only be expressed as:
Tuple[Any, ...]