diff --git a/doc/examples/aggregation.rst b/doc/examples/aggregation.rst index 0b3f43550d..4334d1d62b 100644 --- a/doc/examples/aggregation.rst +++ b/doc/examples/aggregation.rst @@ -177,14 +177,13 @@ reduce function. Here we are doing a simple group and count of the occurrences of ``x`` values: .. doctest:: - + >>> from bson.code import Code >>> reducer = Code(""" ... function(obj, prev){ ... prev.count++; ... } ... """) ... - >>> from bson.son import SON >>> results = db.things.group(key={"x":1}, condition={}, initial={"count": 0}, reduce=reducer) >>> for doc in results: ... print doc