Skip to content

Instantly share code, notes, and snippets.

@AstraLuma
Created January 10, 2017 02:37
Show Gist options
  • Save AstraLuma/34ff6aba55a7227a4eaf46fca95b542a to your computer and use it in GitHub Desktop.
Save AstraLuma/34ff6aba55a7227a4eaf46fca95b542a to your computer and use it in GitHub Desktop.
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