How to fake type() response on Python class
问题 While it has been previously answered how to fake isinstance, in this case I'm trying to fake the response given by type() while reviewing the TypeChanger class. For context Im just trying to understand if is doable or not and why for Python 3.X This is my current test setup: def test(): class TypeChanger(): @classmethod def __instancecheck__(cls, instance): if instance is list: return True else: return False @property def __class__(self): return list def extra_functionality(self): return