Alright.
Let's assume you have a 3.9 virtualenv with cattrs installed.
>>> from cattr import structure
>>> structure(["1", 1.0, True], tuple[int, int, int])
(1, 1, 1)
2. This handler fishes out the tuple type arguments, and it basically returns `tuple(cattr.structure(obj[0], int), cattr.structure(obj[1], int), cattr.structure(obj[2], int))`.
The top level call basically evaluates to `tuple(int(x[0]), int(x[1]), int(x[2]))`. This same mechanism supports other primitives, lists, dicts, sets, frozensets, optionals, enums, attrs classes, unions of attrs classes (with some restrictions) out of the box.
I feel if you'd like a more thorough walkthrough a video call would be better.
I really want to understand what you're doing to compute the results at runtime -- the PEP is already full of example signatures.
Ok, sure. Are you looking for usage examples or me running through how the code works internally?
Could you construct some small(ish) examples and paste them here? I am still having a hard time imagining how you implement this at runtime.
--