algorand/pyteal

Generic ABI Tuple using python variadic type variables

Closed this issue · 2 comments

Problem

There is currently no type inference at the python level for tuples after 5 elements.
Tuple0, ..., Tuple5 and nothing after that.

Solution

It does seem a bit silly to just keep going enumerating all possible tuples with n elements so I propose that PyTeal could use PEP-646.
This would allow the abi.Tuple type to be fully generic both in the number of elements and their types.

Note that this is already documented in a note in https://pyteal.readthedocs.io/en/stable/abi.html#definitions

Ah my bad. I was just going by the code itself. I'm going to close this