Enumeration

Syntax
Enumeration :
   enum IDENTIFIER : NEWLINE
   INDENT
   EnumField*
   DEDENT

EnumField :
   IDENTIFIER,

An enumeration, also referred to as enum is a simultaneous definition of a nominal enumerated type, that can be used to create or pattern-match values of the corresponding enumerated type.

Enumerations are declared with the keyword enum.

An example of an enum item and its use:

enum Animal:
    Dog,
    Cat,

barker = Animal.Dog