15 lines
347 B
Python
15 lines
347 B
Python
import abc
|
|
from typing import Generic, TypeVar
|
|
|
|
from rainbowadn.core import *
|
|
|
|
__all__ = ("Keyed",)
|
|
|
|
KKeyType = TypeVar("KKeyType", bound=Mentionable, covariant=True)
|
|
|
|
|
|
class Keyed(RecursiveMentionable, Generic[KKeyType], abc.ABC):
|
|
def __init__(self, key: HashPoint[KKeyType]):
|
|
assert isinstance(key, HashPoint)
|
|
self.key = key
|