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

Closed
wants to merge 4 commits into
from

Conversation

Projects
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.
26219a5
@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.
d3e4583
@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.
87f6546
Member

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