I know class foo(object) is an old school way of defining a class. But I would like to understand in more detail the difference between these two.
class foo(object)
Referring to this The object in class Foo(object) is meant to make your python 3 code compatible with python 2 and 3.