def __str__(self) -> str:
    s = self.preview_s()
    if (info := self.info):
        return f'''failed to parse: {info}:
{s}'''
    elif (pattern := self.pattern):
        return f'''didn't match pattern: `{pattern.pattern}`:
{s}'''
    else:
        return '{s}'
def __str__(self) -> str:
    s = self.preview_s()
    if (info := self.info):
        return f'failed to parse: {info}:
{s}'
    elif (pattern := self.pattern):
        return f'didn't match pattern: `{pattern.pattern}`:
{s}'
    else:
        return '{s}'