This file contains 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
import inspect | |
import re | |
def _get_name_mangled_attrs(cls, attr): | |
for c in cls.__mro__: | |
try: | |
yield getattr(c, f'_{c.__name__}__{attr}') | |
except AttributeError: | |
continue |