Uses generator expressions instead of filter

Change-Id: I3685a8ecb4d34258e44a1480c4f78aaaf4dca27c
Implements: bp keystone-py3kcompat
Merge "Uses generator expressions instead of filter"