Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
improve docstring
  • Loading branch information
AlexWaygood authored Dec 4, 2023
commit 39756114cf8b14ac8a3040af5cce6bbfdb3bf83a
3 changes: 2 additions & 1 deletion Lib/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1795,7 +1795,8 @@ def _type_check_issubclass_arg_1(arg):
in `issubclass(arg, <protocol>)`.

In most cases, this is verified by type.__subclasscheck__.
As such, we don't perform this check unless we absolutely have to.
Checking it again unnecessarily would slow down issubclass() checks,
so, we don't perform this check unless we absolutely have to.

For various error paths, however,
we want to ensure that *this* error message is shown to the user
Expand Down