From 3ff1e3aa5acde027fe4266338bd09007239b3d8f Mon Sep 17 00:00:00 2001 From: zero13cool Date: Sun, 19 Apr 2015 15:51:30 +0300 Subject: [PATCH] Small fix documentation aggregation --- doc/examples/aggregation.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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