You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But the memorystore implementation of get overrides the base signature to allow prototype to be None which is also the default value, in which case the default buffer prototype is used. This makes the code simpler:
I propose that we push this "prototype can be None" logic to the store ABC, and define a method on the ABC like _get_default_buffer_prototype(self, ...) -> BufferPrototype, which can default to the exact logic MemoryStore (and LocalStore) currently uses.
I also note that the prototype parameter is annotated as a BufferPrototype which is effectively a tuple of Buffer and NDBuffer classes, but the stores methods never return NDBuffers, so shouldn't we just take Buffer classes here?
I also note that the prototype parameter is annotated as a BufferPrototype which is effectively a tuple of Buffer and NDBuffer classes, but the stores methods never return NDBuffers, so shouldn't we just take Buffer classes here?
Following up on this, there are no store methods that do anything with ndbuffers. So why do we pass an ndbuffer class to store methods via prototype: BufferPrototyp, instead of just providing a Buffer class?
Activity
d-v-b commentedon Jan 8, 2026
cc @TomAugspurger who suggested this in #3638
d-v-b commentedon Jan 8, 2026
Following up on this, there are no store methods that do anything with ndbuffers. So why do we pass an ndbuffer class to store methods via
prototype: BufferPrototyp, instead of just providing aBufferclass?