1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Update playbooks_python_version.rst

Minor edits
This commit is contained in:
scottb 2017-04-18 17:05:28 -07:00 committed by Toshio Kuratomi
parent 78dd3496e2
commit 946658cd24

View file

@ -22,9 +22,9 @@ Dictionary Views
In Python2, the :meth:`dict.keys`, :meth:`dict.values`, and :meth:`dict.items` In Python2, the :meth:`dict.keys`, :meth:`dict.values`, and :meth:`dict.items`
methods returns a list. Jinja2 returns that to Ansible via a string methods returns a list. Jinja2 returns that to Ansible via a string
representation that Ansible can turn back into a list. In Python3, those representation that Ansible can turn back into a list. In Python3, those
methods returns a :ref:`dictionary view <python3:dict-views>` object. The methods return a :ref:`dictionary view <python3:dict-views>` object. The
string representation that Jinja2 returns for dictionary views is not parsable string representation that Jinja2 returns for dictionary views cannot be parsed back
by Ansible back into a list. It is, however, easy to make this portable by into a list by Ansible. It is, however, easy to make this portable by
using the :func:`list <jinja2:list>` filter whenever using :meth:`dict.keys`, using the :func:`list <jinja2:list>` filter whenever using :meth:`dict.keys`,
:meth:`dict.values`, or :meth:`dict.items`:: :meth:`dict.values`, or :meth:`dict.items`::