forked from mrocklin/chest
-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
I just installed anaconda4.3 and I notice this module so I star playing with it and I notice this
>>> from chest import Chest
>>> d={42:23}
>>> c=Chest(d, "my-chest")
>>> list(c)
[]
>>> 42 in c
False
>>> c[42]
23
>>> d
{42: 23}
>>> c.flush()
>>> d
{}
>>> list(c)
[]
>>> 42 in c
False
>>> c[42]
Traceback (most recent call last):
File "<pyshell#11>", line 1, in <module>
c[42]
File "C:\Anaconda3\lib\site-packages\chest\core.py", line 182, in __getitem__
raise KeyError("Key not found: %s" % str(key))
KeyError: 'Key not found: 42'
>>> c.get_from_disk(42)
>>> c[42]
23
>>> 42 in c
False
>>> list(c)
[]
>>>
why it say that 42 is not in c?
why it empty my initializer?
why I get an empty list when I do list(c)
but if I close python, delete the folder, and start again and don't give it a initial data it work fine
>>> from chest import Chest
>>> c =Chest(path="my-chest")
>>> c[42]=23
>>> 42 in c
True
>>> list(c)
[42]
>>> c.flush()
>>> list(c)
[42]
>>> 42 in c
True
>>> c[42]
23
>>>
Metadata
Metadata
Assignees
Labels
No labels