kopia lustrzana https://github.com/micropython/micropython
tests/basics: Add test for subclassing an iterable native type.
rodzic
df02f5620a
commit
dd48ccb1e3
|
@ -0,0 +1,7 @@
|
||||||
|
# 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))
|
Ładowanie…
Reference in New Issue