MCPcopy Create free account
hub / github.com/DasyDong/developer-roadmap / __instancecheck__

Method __instancecheck__

code/interface.py:91–92  ·  view source on GitHub ↗
(cls, instance)

Source from the content-addressed store, hash-verified

89class PersonMeta(type):
90 """A person metaclass"""
91 def __instancecheck__(cls, instance):
92 return cls.__subclasscheck__(type(instance))
93
94 def __subclasscheck__(cls, subclass):
95 return (hasattr(subclass, 'name') and

Callers

nothing calls this directly

Calls 1

__subclasscheck__Method · 0.45

Tested by

no test coverage detected