Created
January 10, 2017 02:37
-
-
Save AstraLuma/34ff6aba55a7227a4eaf46fca95b542a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from abc import ABC | |
from collections.abc import Set, Iterable | |
from itertools import count | |
class Base(Iterable, ABC): | |
def __iter__(self): | |
yield from [] | |
def mk(klass): | |
return type('x', (klass,), {})() | |
x = mk(Base) | |
for i in range(500): | |
x = mk(type(x)) | |
print(isinstance(10, Iterable)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment