Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for nested indexing? #53

Open
davidbrochart opened this issue Feb 16, 2022 · 0 comments
Open

Support for nested indexing? #53

davidbrochart opened this issue Feb 16, 2022 · 0 comments

Comments

@davidbrochart
Copy link

What happened:

Nested indexing doesn't seem to be supported.

What you expected to happen:

Maybe it's not in the scope of this library, but it would be great if the mutable mapping felt more like a dictionary.

Minimal Complete Verifiable Example:

import pickle
import zlib

from zict import File, Func, LRU

l4 = File("cache/", mode="a")
l3 = Func(zlib.compress, zlib.decompress, l4)
l2 = Func(pickle.dumps, pickle.loads, l3)
l1 = LRU(100, l2)

l1["foo"] = {}
l1["foo"]
# {}

l1["foo"]["bar"] = {}
l1["foo"]["bar"]
# Traceback (most recent call last):
#   File "<stdin>", line 1, in <module>
# KeyError: 'bar'

Anything else we need to know?:

I'd like to use zict in akernel to cache the execution of cells. It currently uses a dictionary for the cache, and I thought I would be able to swap if with a mutable mapping from zict.

Environment:

  • Dask version: N/A
  • Python version: 3.10
  • Operating System: Ubuntu 21.04
  • Install method (conda, pip, source): pip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant