A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.w3schools.com/python/ref_func_issubclass.asp below:

Website Navigation


Python issubclass() Function

Python issubclass() Function

❮ Built-in Functions

Example

Check if the class myObj is a subclass of myAge:

class myAge:

age = 36

class myObj(myAge):

name = "John"

age = myAge

x = issubclass(myObj, myAge)

Try it Yourself » Definition and Usage

The issubclass() function returns True if the specified object is a subclass of the specified object, otherwise False.

Syntax

issubclass(object, subclass)

Parameter Values Parameter Description object Required. An object. subclass A class object, or a tuple of class objects Related Pages

The isinstance() function, to check if an object is of a certain type.

❮ Built-in Functions

Track your progress - it's free!


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4