T.C. Proctor
T.C. Proctor

Reputation: 6476

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.

Upvotes: 7

Views: 2634

Answers (1)

0TTT0
0TTT0

Reputation: 1322

You could probably just..

class Subclass(GenericClass):
    '''this is a subclass'''

Upvotes: 16

Related Questions