mirror of
https://github.com/pocketpy/pocketpy
synced 2025-12-07 10:40:16 +00:00
* 通过引发py_call错误覆盖相关调用者的ok==false分支 * Revert "通过引发py_call错误覆盖相关调用者的ok==false分支" This reverts commit 36dc0b5d81a02a83dfdeca2d4d6d265f5f793b4b. * add test * rename test files * fix bugs * fix bugs
27 lines
234 B
Python
27 lines
234 B
Python
a = [
|
|
1,2,3,
|
|
4,5,6
|
|
]
|
|
|
|
assert sum(a) == 21
|
|
|
|
c = [
|
|
i for i in range(10)
|
|
if i % 2 == 0
|
|
]
|
|
|
|
assert sum(c) == 20
|
|
|
|
d = (
|
|
1,2,3
|
|
)
|
|
|
|
assert sum(d) == 6
|
|
|
|
b = {
|
|
'a': 1,
|
|
'b': 2,
|
|
'c': 3
|
|
}
|
|
|
|
assert sum(b.values()) == 6 |