Python 3's `yield from` lets you write that in one statement:
def n_queens(n):
yield from (p for p in permutations(range(n))
if len({c + i for i, c in enumerate(p)}) ==
len({c - i for i, c in enumerate(p)}) == n)
It also illustrates how much neater list comprehensions can be in Python versus map/filter since its lambda functions are fairly verbose (even though there's a straightforward correspondence between them):
def n_queens(n):
return filter(lambda p:
len(set(map(lambda x: x[1] + x[0], enumerate(p)))) ==
len(set(map(lambda x: x[1] - x[0], enumerate(p)))) == n,
permutations(range(n)))