Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 16 Online
OpenStudy (anonymous):

hi, what is the difference between : class Shape(object) and class Shape()? hi, what is the difference between : class Shape(object) and class Shape()? @MIT 6.00 Intro Co…

OpenStudy (anonymous):

Might be wrong, and if I am, maybe someone can correct me, but, the difference is very subtle, in that it amounts to "new-style" class vs. "old-style" class. TLDR version: class Shape(object) - inheriting from object base class - is the new style(implemented in Python 3.x), whilst class Shape() is "old-style" class, but there are really minor differences between them. One could say, they can surely be overlooked. http://stackoverflow.com/questions/54867/old-style-and-new-style-classes-in-python Check this link for more info about the new-style x old-style discussion.

OpenStudy (anonymous):

I mean, they can be overlooked except for compatibility of your code.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!