(Aug-17-2021, 07:17 PM)quazirfan Wrote: I come from Java background where every class implicitly inherits from object class. I was under the assumption it is the same with python.Actually, you are right - everything inherits from object, at least in python3 (in python2 there were old-style or classical class and new-style class).
You can see with
isinstance
>>> type(type) <class 'type'> >>> isinstance(type, object) True >>> isinstance(str, object) True >>> isinstance(type, type) True >>> isinstance(str, type) True >>> type.__bases__ (<class 'object'>,) >>> str.__bases__ (<class 'object'>,)
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs