Open thorwhalen opened 3 years ago
In grub/base.py:
Since getattr deligation doesn't work with dunders, did this:
getattr
class SearchStoreMixin(KvReader): store_attr = 'search_store' def __getitem__(self, k): return getattr(self, self.store_attr).__getitem__(k) def __iter__(self): return getattr(self, self.store_attr).__iter__() def __contains__(self, k): return getattr(self, self.store_attr).__contains__(k) def __len__(self): return getattr(self, self.store_attr).__len__() class StoreMixin(SearchStoreMixin): store_attr = 'store'
But surely, there's a more conciser way to do it.
I can make a function that makes classes, but will it pickle?
In grub/base.py:
Since
getattr
deligation doesn't work with dunders, did this:But surely, there's a more conciser way to do it.
I can make a function that makes classes, but will it pickle?