Message408181
My opinion is that supporting `GenericAlias` here would be a bad idea. Associating an implementation of the function with the argument type `list[str]` is ambiguous. Would this implementation be called if any argument of type `list` was supplied, or would it only be called if all elements in the list were of type `str`?
The first option would be efficient, simple, and similar to the way singledispatch treats most other argument-types. However, it would be unintuitive.
The second option would be more intuitive, but could be extremely inefficient if a very long list was passed in. It would also make the code more complicated. |
|
Date |
User |
Action |
Args |
2021-12-10 09:21:40 | AlexWaygood | set | recipients:
+ AlexWaygood, rhettinger, lukasz.langa, kumaraditya |
2021-12-10 09:21:40 | AlexWaygood | set | messageid: <1639128100.59.0.73198755555.issue46032@roundup.psfhosted.org> |
2021-12-10 09:21:40 | AlexWaygood | link | issue46032 messages |
2021-12-10 09:21:40 | AlexWaygood | create | |
|