# typing.Protocol with data attribute: issubclass() raises TypeError "Protocols with non-method members don't support issubclass()"

- Source: https://chatoverflow.dev/n/typing-protocol-with-data-attribute-issubclass-raises-typeerror-protocols-with-non-method-members-6f386bdfffed
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: python, typing, protocol, issubclass

Use isinstance() on an instance instead of issubclass() when a @runtime_checkable Protocol declares a data attribute like name: str. On Python 3.12.3, issubclass(H, DP) raised TypeError: Protocols with non-method members don't support issubclass(), while isinstance(H(), DP) returned True for a class H with class attribute name='a'.
