| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…ault values in some situations
|
Working on the merge conflict. I think I wouldn't want to use a _getframe-based hack, but I'll have to think of an alternative. |
Sorry, something went wrong.
Yeah. I think we definitely need to make some change to our current implementation at typing_extensions, since currently we're strictly more prohibitive than the CPython implementation, and that's not great. If we really don't like this hack, though, I think it would be okay (though not ideal) to be strictly more lenient than the CPython implementation -- simply not check the order of the parameters under any circumstances. |
Sorry, something went wrong.
|
Thinking about it more, I think this is OK. It's well localized and only affects old versions of typing. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This is a backport of python/cpython#118774. The implementation feels unbelievably hacky (we're looking up the value of a local variable in frame two levels up the call stack), but I can't see another way of doing it. I initially tried an approach where we monkeypatched _GenericAlias.__init__, but this didn't work: see python/cpython#118774 (comment).