Skip to content

Instantly share code, notes, and snippets.

View taaaal's full-sized avatar
💭
lol just coding

Tal K. taaaal

💭
lol just coding
View GitHub Profile
class Flags:
def __init__(self, value):
self.value = value
self.flags = [*self.__iter__()]
def __iter__(self):
for k, v in self.__class__.__dict__.items():
if not isinstance(v, property):
continue
if self.has_flag(getattr(self, k)):