Why would it be necessary to subclass from object in Python?
- by rmh
I've been using Python for quite a while now, and I'm still unsure as to why you would subclass from object. What is the difference between this:
class MyClass():
pass
And this:
class MyClass(object):
pass
As far as I understand, object is the base class for all classes and the subclassing is implied. Do you get anything from explicitly subclassing from it? What is the most "Pythonic" thing to do?