map type python3 compatibility