Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python class that inherits, does nothing else

I'm creating a package where I create about ~30 classes that all inherit from a common generic class. Generally, they add or modify methods, but every now and then, the subclass can inherit from the generic and make no modification.

What is the most pythonic way to do this? SubClass = GenericClass works, but it offends my aesthetic sensibilities.

like image 388
T.C. Proctor Avatar asked May 13 '26 16:05

T.C. Proctor


1 Answers

You could probably just..

class Subclass(GenericClass):
    '''this is a subclass'''
like image 107
0TTT0 Avatar answered May 16 '26 07:05

0TTT0



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!