Agree with @kriss, @Noctis, and @Carson, plus more color from me:
class X: pass
and class X(): pass
are synonyms for classic classes while
class X(object): pass
is for new-style classes, as you can see here:
>>> class X:pass
...
>>> class Y(): pass
...
>>> class Z(object): pass
...
>>>
>>> type(X), type(Y), type(Z)
(<type 'classobj'>, <type 'classobj'>, <type 'type'>)
Look at the reference provided by @kriss for more details into the differences. What is invalid in Python 3 is the concept of the classic class... the reason is because classic classes have been deprecated. All three idioms create only new-style classes in any 3.x:
>>> class X:pass
...
>>> class Y(): pass
...
>>> class Z(object): pass
...
>>>
>>> type(X), type(Y), type(Z)
(<class 'type'>, <class 'type'>, <class 'type'>)
Bottom-line? If you're coding in Python 2, try to use new-style classes as much as possible. This way, you've built in your migration path already, plus new-style classes offer more features than classic classes do. (This is somewhat subjective, but if your [classic] classes are relatively simple, then it's possible you won't need to do anything to get them working in Python 3.)