Message403575
Indeed, sorry, my example was bad. My library was raising at several place, and I've extrapolated about generic substitution.
I've indeed other substitutions (without `TypeVar`), and because they were failing, I've assumed that all of my substitutions were failing; I was wrong about generic one.
For example, if I want to substitute `int | Collection[int]` to `int | list[int]`, I will have to replace `types.UnionType` by `typing.Union` or use `reduce`, while it was not necessary in 3.9 where I could just write `get_origin(tp)[new_args]`.
So I'll have to add some `if` in my code. |
|
Date |
User |
Action |
Args |
2021-10-10 07:24:44 | joperez | set | recipients:
+ joperez, gvanrossum, serhiy.storchaka, kj |
2021-10-10 07:24:44 | joperez | set | messageid: <1633850684.31.0.776019239867.issue45418@roundup.psfhosted.org> |
2021-10-10 07:24:44 | joperez | link | issue45418 messages |
2021-10-10 07:24:44 | joperez | create | |
|