

@classmethod
def parse_stream_token(cls, string):
    try:
        if (string[0] == 's'):
            return cls(topological=None, stream=int(string[1:]))
    except:
        pass
    raise SynapseError(400, ('Invalid token %r' % (cls,)))

dataset/ETHPy150Open matrix-org/synapse/synapse/types.py RoomStreamToken.parse_stream_token/VarMisuse@68/88 `string`->`cls`