fork download
def doublable(cls):
	def double(self):
		return self*2
	double = property(double)
	cls.double = double
	return cls
	
@doublable
class C(int): pass

c = C(4)
print(c.double)

	
Success #stdin #stdout 0.02s 9152KB
stdin
Standard input is empty
stdout
8