Primary
isinstance() ⚬ᵖʸ|Documentation|1st|20251021000405-00-⌔
Built-in Functions — Python 3 documentation#isinstance
isinstance(object, classinfo,/)Return
Trueif the object argument is an instance of the classinfo argument, or of a (direct, indirect, or virtual) subclass thereof. If object is not an object of the given type, the function always returnsFalse. If classinfo is a tuple of type objects (or recursively, other such tuples) or a Union Type of multiple types, returnTrueif object is an instance of any of the types. If classinfo is not a type or tuple of types and such tuples, aTypeErrorexception is raised.TypeErrormay not be raised for an invalid type if an earlier check succeeds.Changed in version 3.10: classinfo can be a Union Type.
Printed 2026-06-28.
(echo:: @ ᯤ)
Link to original
Secondary
• • •