PythonExtra/tests/basics/subclass_native_iter.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

8 lines
142 B
Python
Raw Normal View History

# test subclassing a native type which can be iterated over
class mymap(map):
pass
m = mymap(lambda x: x + 10, range(4))
print(list(m))