4.2. Standard Types
Numbers (four separate sub-types)
Regular or “Plain” Integer
Long Integer
Floating Point Real Number
Complex Number
String
List
Tuple
Dictionary
We will also refer to standard types as “primitive data types” in this text because these types represent the primitive data types that Python provides. We will go over each one in detail in Chapters 5, 6 and 7.
CORE NOTE: Standard types are not classes
In Java, although primitive data types are supported, they usually come in class “wrappers” for which instances are created when a data type is needed. In Python, standard types are not classes, so creating integers and strings does not involve instantiation. That also means that you cannot subclass a standard type either, although there ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access