mozilla / jydoop

Efficient Hadoop Map-Reduce in Python
Other
31 stars 19 forks source link

Don't shadow map() and reduce() built-ins #24

Open indygreg opened 11 years ago

indygreg commented 11 years ago

Currently script jobs define the map() and possibly reduce() functions, shadowing Python's global map() and reduce() functions. The built-in functions are quite useful. Moreover it's considered bad Python programming practice to shadow built-in symbols (the common Python style checking tools all raise a fuss when this is done).

Please change the API so special symbols in job scripts aren't sharing names with Python built-ins.

As simple alternatives, I'll throw out prefixing the symbols with "hydoop" or "HYDOOP" or capitalizing the special symbols e.g. "def MAP(key, value, context)".

tarasglek commented 11 years ago

This is good. I think we should rename to Map/Reduce/Combine