GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||
GeezerVison is showing github.com — bpo-46480: add typing.assert_type by JelleZijlstra · Pull Request #30843 · python/cpython Conversation
|
|
@gvanrossum this one is also ready I believe. Feedback on this function in https://mail.python.org/archives/list/[email protected]/thread/MITFQ6Z45RRMXY3HNM66IC3XXS3TA3JN/#MITFQ6Z45RRMXY3HNM66IC3XXS3TA3JN was positive. (I also proposed assert_error() there, but dropped it because of negative feedback.) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
It occurs to me that users of "assert_type()" may be surprised that it doesn't actually perform an assertion at runtime. Consider code like: I wonder if we might consider a word other than "assert", or maybe add the word "static" somewhere. Suggestions:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
That's a reasonable concern, but it's probably better discussed on the typing-sig thread. I'm happy to change the PR if there's consensus for another name. I'll note though that |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I'll plan to make a post tomorrow. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@gvanrossum I think this should be ready to merge soon, since people on the typing-sig thread now seem on board with the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I'll try to take a look soon! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looks pretty good, just a few thoughts :)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Alex Waygood <[email protected]>
Co-authored-by: Alex Waygood <[email protected]>
|
Thanks for the review! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Just 1 tiny nit:
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: David Foster <[email protected]>
|
Planning to merge this tomorrow unless I get more feedback. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Alex Waygood <[email protected]>
See python/cpython#30843. The implementation mostly follows that of cast(). It relies on `mypy.sametypes.is_same_type()`.
See python/cpython#30843. The implementation mostly follows that of cast(). It relies on `mypy.sametypes.is_same_type()`.
See python/cpython#30843. The implementation mostly follows that of cast(). It relies on `mypy.sametypes.is_same_type()`.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.