1 class C: 2 def __init__(self, x): 3 self.x = x 4 5 def value(self): 6 return self.x 7 8 def length(self): 9 return self.double(self.value()) 10 11 def double(self, x): 12 return x * 2 13 14 c = C(3) 15 print c.length() # 6