from __future__ import annotations


_NO_RESULT = object()


class InterpreterResultResolver:
    def resolve(self, result):
        if result is False:
            return False
        if result is not None:
            return result
        return _NO_RESULT

    def is_resolved(self, value) -> bool:
        return value is not _NO_RESULT

    @property
    def no_result(self):
        return _NO_RESULT
