GeezerVison is showing github.com — gh-74690: Document changes made to runtime-checkable protocols in 3.12 by AlexWaygood · Pull Request #103348 · python/cpython
Conversation
AlexWaygood
commented
Apr 7, 2023
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Adds docs, NEWS and WhatsNew entries for changes made in these PRs:
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
hauntsaninja
left a comment
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good. Only thing I'm thinking of is that most users reading What's New still don't have the context that runtime_checkable isinstance is like 400x slower than regular isinstance or whatever. Feels hard to communicate "this thing is 20x faster than it was, but is still 20x slower than you might think it is", but maybe there's a good way :-)
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
AlexWaygood reacted with thumbs up emoji
Only thing I'm thinking of is that most users reading What's New still don't have the context that runtime_checkable isinstance is like 400x slower than regular isinstance or whatever.
Well, only ~15x slower in 3.12 for simple protocols ;)
Feels hard to communicate "this thing is 20x faster than it was, but is still 20x slower than you might think it is"
Yeah... I know what you mean. I feel pretty torn. On the one hand, I agree that this is important context. On the other hand, I feel like this is pretty clearly documented in typing.rst now; that the performance improvement is worth celebrating on its own; and that "What's new" should be primarily focussed on the difference between the Python versions.
I think I'll leave this as it is for now, but happy to accept improvements in followup PRs if we can think of a better way of phrasing it :-)
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
carljm
carljm approved these changes
gvanrossum
Awaiting requested review from gvanrossum
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|