# Pre-PEP Considerations and Feedback: Type Transformations on Variadic Generics

**URL:** <https://discuss.python.org/t/pre-pep-considerations-and-feedback-type-transformations-on-variadic-generics/50605>\
**Category:** Typing\
**Created:** [April 9, 2024, 9:00pm UTC](https://discuss.python.org/t/pre-pep-considerations-and-feedback-type-transformations-on-variadic-generics/50605 "2024-04-09T21:00:46Z")\
**Posts on this page:** 1\
**Showing post:** 20

<div class="post-metadata">

**Author:** ![daggaz](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/daggaz/32/22592_2.png) [@daggaz](https://discuss.python.org/u/daggaz)\
**Post date:** [September 17, 2024, 10:27am UTC](https://discuss.python.org/t/pre-pep-considerations-and-feedback-type-transformations-on-variadic-generics/50605/20 "2024-09-17T10:27:58Z")

</div>

Just throwing my usecase in here:

```python
from typing import TypeVar, TypeVarTuple

T = TypeVar('T')
Shape = TypeVarTuple('Shape')

class Action[T]:
    def run(self) -> T:
        raise NotImplementedError()

class FloatAction(Action[float]):
    def run(self) -> float:
        return 3.2

class IntAction(Action[int]):
    def run(self) -> int:
        return 12

def do_actions(*actions: Action[*Shape]) -> tuple[*Shape]:
    return tuple(action.run() for action in actions)

results: tuple[float, int] = do_actions(FloatAction(), IntAction())

```

In other words, I want to take an arbitrary set of `Action[T]` instances, where each one is parameterised by a different `T`, and return a tuple parameterised by that same set of different `T`s. So I want to unwrap/extract the set of `T` from `tuple[Action[T1], Action[T1]]` into `Tuple[T1, T2]`.

---

_[View the full topic](https://discuss.python.org/t/pre-pep-considerations-and-feedback-type-transformations-on-variadic-generics/50605)._
