Skip to content

Instantly share code, notes, and snippets.

@MSeifert04
Created August 18, 2017 02:08
Show Gist options
  • Save MSeifert04/7a71a6e0887f66f922341e09ef38ed96 to your computer and use it in GitHub Desktop.
Save MSeifert04/7a71a6e0887f66f922341e09ef38ed96 to your computer and use it in GitHub Desktop.
from collections import Mapping
cls = Mapping
subclass = dict
for scls in cls.__subclasses__():
if issubclass(subclass, scls):
cls._abc_cache.add(subclass)
print('found', scls)
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment