class C(object):

    def __init__(self, x):
        self.x = x

def add(self, y):
    return C(self.x + y)

def mul(self, y):
    return C(self.x * y)
C(0).add(1).mul(10).x
Is it pythonic for a function to return chained values / set variables on itself?