What is difference between classes, with and without parenthesis?

what is the difference between class Employee(): and class Employee: ? @mtf

https://www.codecademy.com/courses/learn-python-3/lessons/data-types/exercises/string-representation
here is the first time I’ve encountered with this

When the parens are empty there is no real difference, though they are not needed. We would need them if our class is going to extend a parent class (making it a subclass).

ok so for inheritance purposes right ?

1 Like

Exactly.

>>> class Foo:
    pass

>>> class Bar(Foo):
    pass

>>> a = Bar()
>>> isinstance (a, Foo)
True
>>> 
2 Likes

thanks for the help.

1 Like