diff options
author | Damien George <damien.p.george@gmail.com> | 2015-02-15 01:10:13 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-02-15 01:10:13 +0000 |
commit | f6532bb9e054fd20af5063b1e77ef98863f36c84 (patch) | |
tree | e1655fd67386ff2ee4329420db902dd8b5052ae0 /tests/basics/iter1.py | |
parent | d1c37883756045fb92d58592181bf53481d7693d (diff) | |
download | micropython-f6532bb9e054fd20af5063b1e77ef98863f36c84.tar.gz micropython-f6532bb9e054fd20af5063b1e77ef98863f36c84.zip |
py: Simplify and remove redundant code for __iter__ method lookup.
Diffstat (limited to 'tests/basics/iter1.py')
-rw-r--r-- | tests/basics/iter1.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/basics/iter1.py b/tests/basics/iter1.py index c2ef86a635..5bd7f5090b 100644 --- a/tests/basics/iter1.py +++ b/tests/basics/iter1.py @@ -1,5 +1,14 @@ # test user defined iterators +# this class is not iterable +class NotIterable: + pass +try: + for i in NotIterable(): + pass +except TypeError: + print('TypeError') + class MyStopIteration(StopIteration): pass |