builtup4/bu4/evaluation/constructs/edelayed.py
2021-09-12 12:39:24 +03:00

23 lines
602 B
Python

# Copyright (c) PARRRATE T&V 2021. All rights reserved.
from typing import TypeVar
from bu4.evaluation.constructs.evaluable import Evaluable
from bu4.evaluation.constructs.evalue import EValue
from bu4.evaluation.targets.avanonymouscontainer import AVAnonymousContainer
__all__ = ('EDelayed',)
T = TypeVar('T')
class EDelayed(EValue):
def __init__(self, evaluable: Evaluable):
self.evaluable = AVAnonymousContainer(evaluable).after_value
def call(self, argument: Evaluable) -> Evaluable:
return self.evaluable
def __str__(self):
return f'&{self.evaluable}'