< BACKMake Note | BookmarkCONTINUE >
156135250194107072078175030179198180024228156016206217188240240204172038188098227191228119

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.

NOTE

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 is nothing wrong with wrapping a type around a Python class and modifying a class to what you desire. Python also provides some classes which emulate types and can be subclassed. See Section 13.18.



Last updated on 9/14/2001
Core Python Programming, © 2002 Prentice Hall PTR

< BACKMake Note | BookmarkCONTINUE >

© 2002, O'Reilly & Associates, Inc.