You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's always a bit weird to hit a segfault in Python!
Here's a simple example that hits this issue:
import pickle
from lru import LRU
key_limit = 10
a = LRU(key_limit)
for i in range(key_limit - 5):
a[i] = key_limit - i
print(a[0])
with open("/vol/data0/tmp/example_lru.pkl",'wb') as f:
print("Saving LRU")
pickle.dump(a, f, pickle.HIGHEST_PROTOCOL)
with open("/vol/data0/tmp/example_lru.pkl",'rb') as f:
print("Loading LRU")
b = pickle.load(f)
print(b[0])
It's always a bit weird to hit a segfault in Python!
Here's a simple example that hits this issue:
Output:
Not sure if you've intended the LRU to survive serialization / deserialization, but if not I'd understand closing this.
Thanks!
The text was updated successfully, but these errors were encountered: