econchick / new-coder

New Coder tutorials
zlib License
597 stars 392 forks source link

Change some code to better match the tutorials #210

Open BenjaminPollak opened 8 years ago

BenjaminPollak commented 8 years ago

Change line "import geojson" to "import geojson as g" to reflect newcoder.io

Also change "f.write(geojson.dumps(geo_map))" to "f.write(g.dumps(geo_map))"

merwok commented 8 years ago

Hi, thanks for the patch! In my opinion it would be better to not use aliases: it’s easier to understand “geojson.some_function” deep in the module rather than having to go back to imports to see what “g” is. (There is an exception for example for scientific Python code, where modules have common aliases used consistently: np for numpy, pd for pandas, etc.)

Do you think that changing the other text (from g to geojson) would be better? @econchick do you have a strong preference either way?