-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
In grub/base.py:
Since getattr deligation doesn't work with dunders, did this:
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?
Metadata
Metadata
Assignees
Labels
No labels