# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/01_cons.ipynb.

# %% auto 0
__all__ = ['BASE', 'SIGNS', 'EXPOS', 'ExpoChr']

# %% ../nbs/01_cons.ipynb 3
from enum import StrEnum

from sint import sint
from pstr.nchr import CARET, STARSTAR

# %% ../nbs/01_cons.ipynb 5
BASE = 10
SIGNS = (sint.P, sint.N)
EXPOS = (1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30)

class ExpoChr(StrEnum):
    carot = CARET    # '^'
    dstar = STARSTAR # '**'
    @classmethod
    def to(cls, v: str): return cls(v) if cls.isin(v) else cls.carot
    @classmethod
    def isin(cls, v: str): return v in list(map(str, cls._member_map_.values()))
