def parse(stream: Stream) -> Union[None, Value]: stream.strip() for cls in TYPES: value = cls.parse(stream) if value != None: return value
def parse(stream: Stream) -> Union[None, Value]: """ Parses a value out of the `stream`, or returns `None` if nothing can be parsed. """ stream.strip() for cls in TYPES: value = cls.parse(stream) if value is not None: return value return None