MCPcopy Create free account
hub / github.com/scottrogowski/code2flow / Chain

Class Chain

tests/test_code/py/chained/chained.py:1–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1class Chain():
2 def __init__(self, val):
3 self.val = val
4
5 def add(self, b):
6 self.val += b
7 return self
8
9 def sub(self, b):
10 self.val -= b
11 return self
12
13 def mul(self, b):
14 self.val *= b
15 return self
16
17
18print(Chain(5).add(5).sub(2).mul(10))

Callers 1

chained.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected