New Transformation `..` Operator to Transform Values

IMO, this needs to be convenient and flexible. I.e. step size would be very much preferable to create range objects.

This creation of range/sequence objects is very verbose and would not be convenient at all.

Open/closed is not as important from flexibility POV as one can always just have different starting/ending values. For simplicity and consistency, it might be best just to keep things in line with slice/range closed bound to open bound.

The best that I can think of at the moment is introduction of ternary operator. I am not sure about syntax/naming/etc, but it could look like:

class int:
    def __ternary__(self, other, step=None):
        return range(self, other, step)

print(0:10:)    # range(0, 10)
print(0:10:2)   # range(0, 10, 2)

For int, it would produce ranges, and it could be a good place to start.

Regarding other classes, it should be carefully evaluated what sort of functionality would bring most value. For list, it could be matrix algebra. E.g.:

class new_list(list):
    def __ternary__(self, other, op=operator.add):
        return list(map(op, self, other))

l1 = nes_list([1, 2, 3])
l2 = nes_list([1, 2, 3])
print(l1:l2:mul)    # [2, 4, 6]

But I doubt that this would/should end up in standard library. If the user needs this, it would be possible to implement it easily.

If you want to start by focusing on ranges, I would strongly suggest having a thorough read of PEP 204 - Range Literals: Getting closure - #32 by jbo.

Also, one more question. Are you suggesting this for someone else to do or is it something that you desire to work on yourself?