Dec-18-2018, 05:59 AM
(This post was last modified: Dec-18-2018, 06:10 AM by Gribouillis.)
You can write
In python 2, the explicit reference to 'object' was needed because for backwards compatibility, python 2's class system coexists with an old class system inherited from python 1. So in python 2 there are 'old style classes' (which don't inherit from 'object') and 'new style classes'. Only, the new style classes were new in 2001, but they're no longer new in 2019. In python 3, you can safely ignore the object parent class in the definition.
class SomeName: """docstring"""The class SomeName will be a subclass of 'object' which is the root ancestor of all classes.
In python 2, the explicit reference to 'object' was needed because for backwards compatibility, python 2's class system coexists with an old class system inherited from python 1. So in python 2 there are 'old style classes' (which don't inherit from 'object') and 'new style classes'. Only, the new style classes were new in 2001, but they're no longer new in 2019. In python 3, you can safely ignore the object parent class in the definition.