use of .keys() and .values() on dict object

Hi,

I saw the dict2items filter, which can be use with

# with this var
ips:
  foo: 192.168.1.4
  bar: 1.2.3.4

# a task with a loop on it
  debug:
    msg: "here is an ip {{ item.value }}
  loop: "{{ ips | dict2items | list }}"

When only keys or values are needed, the use of .keys() or .values() seems
easier (especially with filters)

  debug:
    msg: "here is a private ip {{ item }}"
  loop: "{{ ips.values() | list | ipaddr('private') | default('') }}"

but I didn't find any mention of this in the official doc, neither in the
examples I saw, is it better to avoid this way of looping ?

In my opinion it is fine to use the methods of the underlying Python objects.

In some cases it is hard to solve without that, especially with
nested variables:

Environment="FCGI_CHILDREN={{ sympa.web.get(unit_name + '_procs') }}"

Regards
       Racke