147k views
1 vote
How and when abstract classes are used in python

User Bwaxxlo
by
5.1k points

1 Answer

2 votes

Answer:

A class is called an Abstract class if it contains one or more abstract methods. An abstract method is a method that is declared, but contains no implementation. Abstract classes may not be instantiated, and its abstract methods must be implemented by its subclasses.

Step-by-step explanation:

So it only makes sense to use them if you plan to have preferably more than one subclass.

User Sahesh
by
5.0k points