mirror of
https://github.com/pocketpy/pocketpy
synced 2026-02-04 06:30:17 +00:00
This commit is contained in:
parent
ecdea105d6
commit
8ff3f44179
@ -45,3 +45,22 @@ income = (gross_wages
|
|||||||
- ira_deduction
|
- ira_deduction
|
||||||
- student_loan_interest)
|
- student_loan_interest)
|
||||||
'''.strip(), 'main.py', 'exec')
|
'''.strip(), 'main.py', 'exec')
|
||||||
|
|
||||||
|
res = []
|
||||||
|
class Thing:
|
||||||
|
def do_a(self):
|
||||||
|
res.append("A")
|
||||||
|
return self
|
||||||
|
def do_b(self):
|
||||||
|
res.append("B")
|
||||||
|
return self
|
||||||
|
def do_c(self):
|
||||||
|
res.append("C")
|
||||||
|
return self
|
||||||
|
|
||||||
|
(Thing()
|
||||||
|
.do_a()
|
||||||
|
.do_b()
|
||||||
|
.do_c())
|
||||||
|
|
||||||
|
assert res == ["A", "B", "C"]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user