micropython

Annotated tests/tuple_call.py

671:76bdd4381b66
2013-07-04 Paul Boddie Fixed operator and built-in function invocations to use the "apply" function. Added a proper translation of print statements. syspython-as-target
paul@408 1
#!/usr/bin/env python
paul@408 2
paul@408 3
a1 = tuple((1, 2, 3))
paul@408 4
a2 = tuple((1, 2, 3))
paul@408 5
b1 = tuple((1, tuple((2, 3)), 4, 5))
paul@408 6
paul@408 7
result_1 = a1[0]
paul@408 8
result_2 = a2[1]
paul@408 9
result_3 = b1[1][1]
paul@408 10
result_4 = b1[2]
paul@408 11
resultL_2 = len(b1[1])
paul@408 12
resultL_3 = len(a1)
paul@408 13
resultL_4 = len(b1)
paul@408 14
paul@408 15
# vim: tabstop=4 expandtab shiftwidth=4