Repository navigation
test suite characterizing dict.get() - #13225
Conversation
This comment has been minimized.
This comment has been minimized.
|
For additional context: it's not obvious that all of these variants are needed, but some of them change in non-obvious ways with #13222 so I think it's reasonable. |
This comment has been minimized.
This comment has been minimized.
|
Discovered a new type of edge case for Analysis of some mypy primer results linked, but the theme is what happens if the default value is an empty container type. Right now for Note that for the fully concrete |
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
srittau
left a comment
There was a problem hiding this comment.
Thanks! It's good to have these test cases as regression tests. They can always be amended or changes as is necessary, but at least we need to make a conscious decision about that.
While working on understanding the subtleties of
dict.get(), I read this comment from Jelle:Here's those test cases which reflect the current behavior in several different contexts.
I also had this one, but I'm convinced this is just a mypy bug. It'd probably be a good regression test there, if this version of
TypeOfAny.special_formis ever split to a new type of Any as suggested by python/mypy#15497 (comment).