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

do_dictsort: update example ready to copy/paste #1209

Merged
merged 1 commit into from May 16, 2020

Conversation

mhansen
Copy link
Contributor

@mhansen mhansen commented May 16, 2020

When iterating over a dict you usually want to pull out the keys and values.

When iterating over a dict you usually want to pull out the keys and values.
@davidism davidism closed this May 16, 2020
@davidism davidism reopened this May 16, 2020
@davidism davidism merged commit 2dd7691 into pallets:2.11.x May 16, 2020
@mhansen
Copy link
Contributor Author

mhansen commented May 16, 2020

Thanks for reviewing! Sorry I should have explained ‘why’ / my experience report: it’s because I wasn’t sure if Jinja would be default look over items, keys, or values. I assumed items, but then I wasn’t sure if accessing the key and value from items would be like in normal python ([0] or [1] I think? Or would it be .key and .value? Or is it just looping over keys, like in normal python if you say “for key in dict:”?

Anyway I searched for another example to show me how people are grabbing our keys and values and found this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants