-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
NamedTuple joined with Tuple crashes mypy #3117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
How is that funny unicode character you used in the title pronounced? |
Hmm, in Unicode it's called "square cup", but I suppose in math it's just pronounced as "join"? I only saw it for the first time a couple weeks ago, and liked it a lot :D |
This is not a big deal (it's not the root cause of the crash), but still: I think it might help new contributors to
What I know about source code:
As I'm fixing this issue, I found that two fallbacks are joined, and they have a different number of type arguments. What do type arguments even mean for fallback? I thought Anyway, for now I just custom-cased this (it only affects revealed type print out). |
I'm happy to see more comments added, and if there really are different unrelated things with different behavior all named fallback I agree we should rename at least some of them. But maybe the comments should come first. |
I think that all fallbacks are similar, and the issue is with comments that describe them in multiple different ways. It would make sense to have a single detailed description of fallbacks and have comments of fallbacks include a reference to this description. |
(FWIW, the symbol is usually just called union.) |
The original crash I reported no longer occurs on current master. The PR to fix this issue is repurposed to make somewhat more realistic stubs and put in safety asserts as per @ilevkivskyi suggestions. |
So can we close this issue? |
I think so! @ilevkivskyi should I create a new issue to explain what the PR is doing? |
@pkch I don't think we need another issue, the discussion in the PR is already "self-documenting". |
(based on #3111)
join
ofTuple
andnamedtuple
:results in
The text was updated successfully, but these errors were encountered: