September 2026
1051 pages
35h 4m
English
In this chapter, we’ll describe enumerations, another interesting data type that Python makes available to the developer as part of the standard library.
This is not a fixed, defined data type, but rather an approach to defining your own task-specific data types.
In the context of object-oriented programming in Chapter 19, we’ll discuss in depth how to create custom data types with any functionality. At this point, we'll jump ahead a bit and tackle creating our own enumeration types.
In this chapter, we use the terminology and also the syntax of object-oriented programming, which you’ll get to know in its entirety in Chapter 19. At this point, it suffices to know that a data type is defined by a class. The class ...
Read now
Unlock full access