builtup4/bu4/indexing/constructs/inull.py

21 lines
521 B
Python

# Copyright (c) PARRRATE T&V 2021. All rights reserved.
from bu4.evaluation.av.evtype import evtype
from bu4.evaluation.constructs.enull import ENull
from bu4.evaluation.constructs.evaluable import Evaluable
from bu4.indexing.constructs.indexed import Indexed
from bu4.parsing.codes import CODE_NULL
__all__ = ('INull',)
class INull(Indexed):
def attach(self, ev: evtype) -> Evaluable:
return ENull()
def __str__(self):
return '?'
def __bytes__(self):
return bytes([CODE_NULL])