"""
:file: enum.py

Contains a more natural enum implementation.

:date: 10/06/2016
:authors:
    - Gilad Naaman <gilad@naaman.io>
"""

from .base import *
from .scalars import *
import collections


__all__ = ('Enum', 'auto')


class auto:
    # This is implemented solely to satisfy PyCharm's type-checker.
    # In reality this function will never be called
    def __int__(self):
        raise RuntimeError('This is not supposed to happen')


class Literal:
    def __init__(self, enum_type, literal_name, value):
        self.enum = enum_type
        self.literal_name = literal_name
        self.value = value