File tree Expand file tree Collapse file tree 3 files changed +38
-0
lines changed
Expand file tree Collapse file tree 3 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ # test builtin "all" and "any"
2+
3+ tests = (
4+ (),
5+ [],
6+ [False ],
7+ [True ],
8+ [False , True ],
9+ [True , False ],
10+ [False , False ],
11+ [True , True ],
12+ (False for i in range (10 )),
13+ (True for i in range (10 )),
14+ )
15+
16+ for test in tests :
17+ print (all (test ))
18+
19+ for test in tests :
20+ print (any (test ))
Original file line number Diff line number Diff line change 1+ # test builtin "sum"
2+
3+ tests = (
4+ (),
5+ [],
6+ [0 ],
7+ [1 ],
8+ [0 , 1 , 2 ],
9+ (i for i in range (10 )),
10+ )
11+
12+ for test in tests :
13+ print (sum (test ))
14+ print (sum (test , - 2 ))
Original file line number Diff line number Diff line change 2626#print(1j / 2j) uPy doesn't print correctly
2727#print(1j ** 2) uPy doesn't print correctly
2828#print(1j ** 2j) uPy doesn't print correctly
29+
30+ # builtin abs
31+ print (abs (1j ))
32+ print (abs (1j + 2 ))
You can’t perform that action at this time.
0 commit comments