◐ Shell
clean mode source ↗

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 AlexWaygood changed the title gh-74690: typing._ProtocolMeta.__instancecheck__: Cache results of _get_protocol_attrs and _callable_members_only gh-74690: typing: Call _get_protocol_attrs and _callable_members_only at protocol class creation time, not during __isinstance() checks

Apr 1, 2023

@AlexWaygood AlexWaygood changed the title gh-74690: typing: Call _get_protocol_attrs and _callable_members_only at protocol class creation time, not during __isinstance() checks gh-74690: typing: Call _get_protocol_attrs and _callable_members_only at protocol class creation time, not during isinstance() checks

Apr 1, 2023

AlexWaygood

Comment on lines +2000 to +2006

AlexWaygood

gaogaotiantian pushed a commit to gaogaotiantian/cpython that referenced this pull request

Apr 8, 2023
…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

Apr 11, 2023
…bers_only` at protocol class creation time, not during `isinstance()` checks (python#103160)

Labels