Fix Python 3.x compatibility

map() is a generator in Py3
Merge branch 'master' into debian