chaining our methods together python code example
Example 1: class chain methods python
a = foo()
a.line()
a.my_print()
a.bar()
a.my_print()
assert a.kind == 'bar'
Example 2: class chain methods python
c = foo().line().my_print().bar().my_print()
assert c.kind == 'bar'