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

question about for-loops on mappings #21

Open
janesser opened this issue Jan 5, 2025 · 1 comment
Open

question about for-loops on mappings #21

janesser opened this issue Jan 5, 2025 · 1 comment

Comments

@janesser
Copy link

janesser commented Jan 5, 2025

i am trying to get a for loop over a dict (not a list)

is there some best-practice function that would e.g. unfold dict.keys() to a visitable list ?

snapcraft.yaml.template:24:10:
  'Expression' object has no attribute 'visited':
   $_.epackages[$_.version][$_.name].keys()
Finished with errors.

thanks in advance

@lbovet
Copy link
Owner

lbovet commented Feb 9, 2025

Iterating over arrays resulting of expressions has not been considered, unfortunately...

Can you submit a PR illustrating your expectation in test/samples? If it is not too complex, we might invest time to tackle this.

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

2 participants