A few improvements to the docs and a tiny cleanup #89

wants to merge 4 commits into


None yet
2 participants

Please merge a few improvements I made to the docs, and a tiny cleanup in the bson.has_c() function. Thanks!

wbolster added some commits Jan 25, 2012

@wbolster wbolster Don't overwrite built-in names in map/reduce examples
Avoid assigning the MongoDB map/reduce function definitions to Python
variables that have the same name as the built-in Python functions map()
and reduce(), since that will effectively remove the possibility of
using those built-ins in surrounding code.
@wbolster wbolster Improve legibility of map/reduce code examples
Use triple-quoted multiline strings in the examples, so that the
examples are more readable. It also makes copy/pasting (e.g. to a
mongo shell) a lot easier.
@wbolster wbolster Don't overwrite built-in id() function in example 01668e8
@wbolster wbolster Use _use_c variable in bson.has_c() function
Don't needlessly retry to import _cbson each time the (public)
bson.has_c() function is called. The internal _use_c variable
that is set when the module is loaded already contains the
needed information.

behackett commented Feb 8, 2012

Thanks for this. There was one really minor bug in your map/reduce example change which I fixed (along with a few other unrelated doc test problems). Merged to master.

behackett closed this Feb 8, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment