mirror of
https://github.com/licsber/micropython.git
synced 2024-09-21 09:30:24 +08:00
8 lines
142 B
Python
8 lines
142 B
Python
|
# 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))
|