I'm using memoize with keyword arguments and am having problems with the ENOVAL part of the key when using for key in cache to iterate over the keys.
This is the original key (ENOVAL is a Constant):

But when I subsequently iterate over the keys I get this (ENOVAL is now a tuple with a string member):

This is an invalid key (cache.get(key) returns nothing).
I experimented with changing args_to_key() as shown, and the problem goes away.
if kwargs:
# XXX this seems to become a nested tuple? use string for now
# key += (ENOVAL,)
key += ('ENOVAL',)
I'm using memoize with keyword arguments and am having problems with the
ENOVALpart of the key when usingfor key in cacheto iterate over the keys.This is the original key (
ENOVALis aConstant):But when I subsequently iterate over the keys I get this (
ENOVALis now a tuple with a string member):This is an invalid key (
cache.get(key)returns nothing).I experimented with changing
args_to_key()as shown, and the problem goes away.