Wed, 25 Apr 2018 15:29:25 +0200 [utils] Fixes compatiblity of QueryCache with expected dict interface
Laurent Wouters <lwouters@cenotelie.fr> [Wed, 25 Apr 2018 15:29:25 +0200] rev 12308
[utils] Fixes compatiblity of QueryCache with expected dict interface QueryCache is expected to mimick the interface of the dict built-in. The current __iter__ implementation breaks this expectation by iterating over key, value pairs instead of only the keys. This changeset fixes this issue by changing the __iter__ implementation to iterate over the keys in the cache and providing an implementation of the items method with a contract identical to the dict build-in (return a copy of the key- value pairs within the dictionary as a list).
(0) -10000 -3000 -1000 -300 -100 -30 -10 -1 +1 +10 +30 +100 +300 tip