-
-
Notifications
You must be signed in to change notification settings - Fork 373
Closed
Description
Thi is a suggestion to have a BaseStore class or ABC, that store implementations can inherit from to have basic functionality.
Problem description
Saying that stores are "just" MutableMapping may be insufficient, a number of places call methods on stores that are not available in MutableMapping, which:
- Make static type Checking fails if one uses
MutableMappingas a type annotation. - Would provide a default methods, like
close()method that is no-op, and would avoid the need to check for method existence. - Avoid reimplementation of boilerplate :
def __len__(self): return len(self.keys()), still allowing overwrite.
perlman
Metadata
Metadata
Assignees
Labels
No labels