

def format_multimatches(self, caller, matches):
    '\n        Format multiple command matches to a useful error.\n\n        This is copied directly from the default method in\n        evennia.commands.cmdhandler.\n\n        '
    string = 'There were multiple matches:'
    for (num, match) in enumerate(matches):
        (candidate, cmd) = match
        is_channel = (hasattr(cmd, 'is_channel') and cmd.is_channel)
        if is_channel:
            is_channel = ' (channel)'
        else:
            is_channel = ''
        is_exit = (hasattr(cmd, 'is_exit') and cmd.is_exit)
        if (is_exit and cmd.destination):
            is_exit = (' (exit to %s)' % cmd.destination)
        else:
            is_exit = ''
        id1 = ''
        id2 = ''
        if ((not (is_channel or is_exit)) and (hasattr(cmd, 'obj') and (cmd.obj != caller))):
            id1 = ('%s-' % cmd.obj.name)
            id2 = (' (%s-%s)' % ((num + 1), candidate.cmdname))
        else:
            id1 = ('%s-' % (num + 1))
            id2 = ''
        string += ('\n  %s%s%s%s%s' % (id1, candidate.cmdname, id2, is_channel, is_exit))
    return string

dataset/ETHPy150Open evennia/evennia/evennia/commands/default/syscommands.py SystemMultimatch.format_multimatches/original