python 3 issue with map behavior