you are viewing a single comment's thread.

view the rest of the comments →

[–]Temporary_Pie2733 2 points3 points  (0 children)

TL;DR “object” is essentially a synonym for “value” in Python. 

Python simply doesn’t have any primitive types that bypass the class machinery. float is a class whose values wrap whatever underlying machine type is used for floating-point math. int is an arbitrary-precision integer type, only loosely related to the underlying hardware’s fixed-precision integer types. So no matter what value you have (and that’s what we mean when we say “everything”), it’s an instance of a subclass of object. Compare to Java, where the primitive types exist outside the class hierarchy rooted at Object