
Oct. 1, 2020
7:07 a.m.
On Thu, 1 Oct 2020 at 01:19, Eric Traut <eric@traut.com> wrote:
I'm specifically trying to address cases where overloads (and other existing mechanisms) do not solve the problem. The examples I provided at the top of this thread cannot be handled with overloads.
Have you actually read my example? It looks like no, so just FYI I took exactly one of the examples from your post. It can be equally applied to the second example you posted: @overload def is_two_element_tuple(val: Tuple[_T, _T]) -> Literal[True]: ... @overload def is_two_element_tuple(val: Tuple[_T, ...]) -> bool: ... Anyway, it looks like arguing for the sake of arguing plagued this list too, unsubscribing. -- Ivan