def named_list(items, name='item'):
    """named_list([1, 2, 3], 'number') -> 'numbers (1, 2, 3)"""
    if len(items) == 1:
        return '%s (%r)' % (name, items[0])
    else:
        if name.endswith('y'):
            name = name[:-1] + 'ie'
        return '%ss (%s)' % (name, ', '.join(map(repr, items)))
