10000 issubclass() · ammarlodhi255/python-src@f61d860 · GitHub
[go: up one dir, main page]

Skip to content

Commit f61d860

Browse files
committed
issubclass()
1 parent 6b614df commit f61d860

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

OOP/inheritance.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,6 @@ def display_details(self):
4747

4848
# Check to see if volks_1 is an instance of Car
4949
print(isinstance(volks_1, Car))
50+
51+
# Check to see if one class is a subclass of another class
52+
print(issubclass(Volkswagen, Car))

0 commit comments

Comments
 (0)
0