Open oz123 opened 7 years ago
In items
and values
, the loop is like:
for key in self:
try:
r.append(self[key])
self[key] may trigger expiration--delete while iterating. Solution is to iterate over the copy of all keys:
for key in list(self.keys()):
try:
r.append(self[key])
@kophy Because this package seemed abandoned, I forked it and modified it. I also added some things to a similar package called ttldict. You can find updated packages in pypi:
https://pypi.python.org/pypi/ttldict/
The code is tested on all Python3 versions.
feel free to star the project in https://github.com/mobilityhouse/ttldict.
And BTW, sorry for posting here so late about the work done in parallel...
I am seeing a very annoying bug when using this library with Python 3.5: