Snippet 1:
class Room(Object):
pass
Snippet 2:
class Room():
pass
What is the different between both of the code and why we write object in the above code?
Snippet 1:
class Room(Object):
pass
Snippet 2:
class Room():
pass
What is the different between both of the code and why we write object in the above code?
Both are the same in Python3
.
Read more about it in Python's documentation.
You might want to read this stack overflow question as well.
Search old style classes vs new style classes in Python
.