# What exactly is the difference between:
class Test:
pass
# and
class Test2(object):
pass
ultimatebuster
14
Posting Whiz in Training
Recommended Answers
Jump to Post# What exactly is the difference between: class Test: pass # and class Test2(object): pass
If you use Python3 there is no difference other than the name of the class. That means class Test will automatically inherit objects.
In Python2 you can use for instance __slots__ …
All 3 Replies
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
ultimatebuster
14
Posting Whiz in Training
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.