This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author AlexWaygood
Recipients AlexWaygood, kumaraditya, lukasz.langa, rhettinger
Date 2021-12-10.09:21:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1639128100.59.0.73198755555.issue46032@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-12-10 09:21:40AlexWaygoodsetrecipients: + AlexWaygood, rhettinger, lukasz.langa, kumaraditya
2021-12-10 09:21:40AlexWaygoodsetmessageid: <1639128100.59.0.73198755555.issue46032@roundup.psfhosted.org>
2021-12-10 09:21:40AlexWaygoodlinkissue46032 messages
2021-12-10 09:21:40AlexWaygoodcreate