diff options
author | Damien George <damien.p.george@gmail.com> | 2014-05-06 16:38:54 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-05-06 16:38:54 +0000 |
commit | 491cbd6a7cd0a212e28c548789db432b4e64327e (patch) | |
tree | 5e8ff14972d26e05c7ef5f047f6f1c799836fc40 /tests | |
parent | 33b3a6905d30157efa8393893fd11a5104834354 (diff) | |
download | micropython-491cbd6a7cd0a212e28c548789db432b4e64327e.tar.gz micropython-491cbd6a7cd0a212e28c548789db432b4e64327e.zip |
py: Add keyword arg support to enumerate constructor.
Need to have a policy as to how far we go adding keyword support to
built ins. It's nice to have, and gets better CPython compatibility,
but hurts the micro nature of uPy.
Addresses issue #577.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/basics/enumerate.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/basics/enumerate.py b/tests/basics/enumerate.py index da97f46010..88747557a0 100644 --- a/tests/basics/enumerate.py +++ b/tests/basics/enumerate.py @@ -4,3 +4,7 @@ print(list(enumerate([1, 2, 3], 5))) print(list(enumerate([1, 2, 3], -5))) print(list(enumerate(range(1000)))) +# specifying args with keywords +print(list(enumerate([1, 2, 3], start=1))) +print(list(enumerate(iterable=[1, 2, 3]))) +print(list(enumerate(iterable=[1, 2, 3], start=1))) |