Quiz: Difference between implicit and explicit inheritence

Steven D'Aprano steve+comp.lang.python at pearwood.info
Mon Aug 28 03:55:04 EDT 2017


In Python 3, what's the difference between these two classes?


# implicitly inherit from object
class Spam:
    ...

# explicitly inherit from object
class Spam(object):
    ...





S
P
O
I
L
E
R
 
S
P
A
C
E




If you sense a trick question, you're right :-)




-- 
“You are deluded if you think software engineers who can't write 
operating systems or applications without security holes, can write 
virtualization layers without security holes.” —Theo de Raadt



More information about the Python-list mailing list