iirc memorystore instances get a repr based on the memory location of the underlying dictionary. Any code example that creates a memorystore will generate different output each invocation as the name of the store will change, which is a problem for documentation, as the same example will generate different output. So it would be convenient to give memorystore instances names that are unique but deterministic (within a single python process).
I had 2 ideas:
- Generate names from a global counter that increments each time a memorystore is created. So the first, second, ... nth memory store created would always have the same name across executions of the same program.
- Allow users to provide a
display_name kwarg to memorystore creation. The name does nothing except show up in the repr.
Does anyone else have ideas here?
iirc memorystore instances get a repr based on the memory location of the underlying dictionary. Any code example that creates a memorystore will generate different output each invocation as the name of the store will change, which is a problem for documentation, as the same example will generate different output. So it would be convenient to give memorystore instances names that are unique but deterministic (within a single python process).
I had 2 ideas:
display_namekwarg to memorystore creation. The name does nothing except show up in the repr.Does anyone else have ideas here?