gh-74690: typing: Call `_get_protocol_attrs` and `_callable_members_only` at protocol class creation time, not during `isinstance()` checks by AlexWaygood · Pull Request #103160 · python/cpython
Conversation
AlexWaygood
changed the title
gh-74690:
gh-74690: typing: Call typing._ProtocolMeta.__instancecheck__: Cache results of _get_protocol_attrs and _callable_members_only_get_protocol_attrs and _callable_members_only at protocol class creation time, not during __isinstance() checks
AlexWaygood
changed the title
gh-74690: typing: Call
gh-74690: typing: Call _get_protocol_attrs and _callable_members_only at protocol class creation time, not during __isinstance() checks_get_protocol_attrs and _callable_members_only at protocol class creation time, not during isinstance() checks
gaogaotiantian pushed a commit to gaogaotiantian/cpython that referenced this pull request
…bers_only` at protocol class creation time, not during `isinstance()` checks (python#103160)
warsaw pushed a commit to warsaw/cpython that referenced this pull request
…bers_only` at protocol class creation time, not during `isinstance()` checks (python#103160)