On 27 June 2014 20:13, kesten broughton <[email protected]> wrote:

> The problem is, sometimes it's nice to have a list to loop over especially
> if the client code doesn't know the keys.
> Other times it would be nice to have a dict if you have the key since
> writing loops can be messy.
>
> I think it would be very nice in these cases to have a dict_to_list
> adapter and list_to_dict adapter as jinja2 plugins, so the original
> datastructure can be whichever.
>


​You can already easily use a dict as a list:

dict.keys()
dict.values()
dict.items()

​

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAEhzMJAD9UnTZu8f5LeLNk%2BonRHeb4w84-tpPoX1BPhj1L2NCg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to