Skip to content

Commit dd48ccb

Browse files
committed
tests/basics: Add test for subclassing an iterable native type.
1 parent df02f56 commit dd48ccb

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# test subclassing a native type which can be iterated over
2+
3+
class mymap(map):
4+
pass
5+
6+
m = mymap(lambda x: x + 10, range(4))
7+
print(list(m))

0 commit comments

Comments
 (0)