micropython

Annotated tests/range.py

334:662e6ce9a750
2010-06-12 Paul Boddie Fixed scope handling where names are imported into namespaces. Added a simple iter built-in function. Made the xrange test use the iteration protocol.
paul@91 1
#!/usr/bin/env python
paul@91 2
paul@91 3
a = 1
paul@246 4
b = 20
paul@246 5
l = range(a, b)
paul@246 6
paul@246 7
result1_19 = len(l)
paul@246 8
result_1 = l[0]
paul@246 9
result2_19 = l[-1]
paul@91 10
paul@91 11
# vim: tabstop=4 expandtab shiftwidth=4