Encoder/Decoder should be cached according to arguments as well

Issue #49 new
Johan Rosenkilde created an issue

Currently, an Encoder taking some arguments is cached no matter which arguments are given. Thus the same encoder is returned even though the user asked for one with different parameters.

Comments (1)

  1. Johan Rosenkilde reporter

    To be clear, a constructed Encoder should always be cached, but it's key in the cache dictionary should depend on its arguments.

    Remember that some python values are not hashable, e.g. if one of the arguments is a list. In this case, I guess a sensible default is to not cache.

    This is subtle stuff. Remember to write tests.

  2. Log in to comment