Mercurial > libervia-backend
comparison sat_frontends/tools/misc.py @ 3715:b9718216a1c0 0.9
merge bookmark 0.9
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 01 Dec 2021 16:13:31 +0100 |
parents | 80815f2f12cf |
children | 524856bd7b19 |
comparison
equal
deleted
inserted
replaced
3714:af09b5aaa5d7 | 3715:b9718216a1c0 |
---|---|
74 | 74 |
75 def __getattr__(self, flag): | 75 def __getattr__(self, flag): |
76 self._used_flags.add(flag) | 76 self._used_flags.add(flag) |
77 return flag in self.flags | 77 return flag in self.flags |
78 | 78 |
79 def __getitem__(self, flag): | |
80 return getattr(self, flag) | |
81 | |
79 def __len__(self): | 82 def __len__(self): |
80 return len(self.flags) | 83 return len(self.flags) |
81 | 84 |
82 def __iter__(self): | 85 def __iter__(self): |
83 return self.flags.__iter__() | 86 return self.flags.__iter__() |