In short, he sets up free magic ponies.
In the long run, Python 2.2 and earlier used "old-style classes." They were a special implementation of classes, and they had several limitations (for example, you could not create subclass classes). To fix this was to create a new class style. But, this will be due to some changes that are incompatible in the opposite direction. Therefore, to ensure that code written for old-style classes still works, the object class was created to act as a superclass for all new-style classes. So, in Python 2.X, class Foo: pass will create an old style class Foo(object): pass , and class Foo(object): pass will create a new style class.
See Guido Combining Types and Classes in Python 2.2 for longer.
And, in general, itβs nice to get used to all your classes becoming new, because some things (the @property decorator is the one that comes to mind) will not work with the old style classes.
David Wolever Apr 6 2018-10-10T00: 00Z
source share