Scroll Down to See All▾
absaiterallanextanyasciibinboolbreakpointbytearraybytescallablechrclassmethodcompilecomplexdelattrdictdivmodenumerateevalexecfilterfloatformatfrozensetgetattrglobalshasattrhashhelphexidinputintisinstanceiterlenlistlocalsmapmaxmemoryviewminnextobjectoctopenordpowprintpropertyrangereprreversedroundsetsetattrslicesortedstaticmethodstrsumsupertupletypevarszip__import__clear_(dict)clear_(list)clear_(set)copy_(dict)copy_(list)copy_(set)fromkeysgetitemskeyspop_(dict)pop_(list)pop_(set)popitemsetdefaultupdatevaluescount_(tuple)count_(list)count_(str)index_(tuple)index_(list)index_(str)adddifferencedifference_updatediscardintersectionintersection_updateisdisjointissubsetissupersetremove_(set)remove_(list)symmetric_differencesymmetric_difference_updateunionupdateclosefilenoflushisattyreadreadablereadlinereadlinesseekseekabletelltruncatewritablewritewritelinesappendextendinsertreversesortcapitalizecasefoldcenterencodeendswithexpandtabsfindformatisalnumisalphaisasciiisdecimalisdigitisidentifierislowerisnumericisprintableisspaceistitleisupperjoinljustlowerlstripmaketranspartitionreplacerfindrindexrjustrpartitionrsplitrstripsplitsplitlinesstartswithstripswapcasetitletranslateupperdirzfillFunction Details: issubclass
Description
Returns whether 'class' is a derived from another class or is the same class.
Extended Description
The issubclass() function checks if the first argument is a subclass of the second argument. If the second argument is a tuple of classes, it checks if the first argument is a subclass of any of those classes. A class is considered a subclass of itself.
Read More about issubclass from Python Documentation
Function Signature
issubclass(class: type, classinfo: Union[type, Tuple[type, ...]]) -> bool
Module: builtins
Parameters
Parameter List
- class: type
- classinfo: Union[type, Tuple[type, ...]]
Return
Returns a boolean indicating whether the first argument is a subclass of the second argument (or any class in the tuple of the second argument).
Return Type
bool
Output
Explanation
This example demonstrates basic usage of issubclass() with a simple inheritance hierarchy.