PyCharm
 
Get PyCharm
You are viewing the documentation for an earlier version of PyCharm.

Extract superclass

Last modified: 15 September 2023

The Extract Superclass refactoring lets you create a superclass for an existing class.

The members of the original class can be moved to the superclass. For a method, you can transfer only the method declaration but not the implementation, declaring the method as abstract in the superclass. As a result, you will have a superclass and the original class inheriting from the superclass.