forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pythongh-74690: Optimise
isinstance()
checks for nominal subclasses…
… of runtime-checkable protocols
- Loading branch information
1 parent
ecc5441
commit 694960d
Showing
2 changed files
with
6 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
Misc/NEWS.d/next/Library/2023-03-30-23-31-41.gh-issue-74690.DeUPLy.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Speed up :func:`isinstance` checks against :func:`runtime-checkable | ||
protocols <typing.runtime_checkable>` by 20x for nominal subclasses of the | ||
protocol. Patch by Alex Waygood. |