@@ -889,7 +889,7 @@ def options(self):
889889
890890 return options
891891
892- def aggregate (self , ops ):
892+ def aggregate (self , pipeline ):
893893 """Perform an aggregation using the aggregation framework on this
894894 collection.
895895
@@ -901,7 +901,7 @@ def aggregate(self, ops):
901901 `aggregate command`_. will be sent to a secondary or slave.
902902
903903 :Parameters:
904- - `ops `: a single command or list of aggregation commands
904+ - `pipeline `: a single command or list of aggregation commands
905905
906906 .. note:: Requires server version **>= 2.1.1**
907907
@@ -910,16 +910,16 @@ def aggregate(self, ops):
910910 .. _aggregate command:
911911 http://docs.mongodb.org/manual/applications/aggregation
912912 """
913- if not isinstance (ops , (dict , list , tuple )):
914- raise TypeError ("ops must be a dict, list or tuple" )
913+ if not isinstance (pipeline , (dict , list , tuple )):
914+ raise TypeError ("pipeline must be a dict, list or tuple" )
915915
916- if isinstance (ops , dict ):
917- ops = [ops ]
916+ if isinstance (pipeline , dict ):
917+ pipeline = [pipeline ]
918918
919919 use_master = not self .slave_okay and not self .read_preference
920920
921921 return self .__database .command ("aggregate" , self .__name ,
922- pipeline = ops ,
922+ pipeline = pipeline ,
923923 read_preference = self .read_preference ,
924924 slave_okay = self .slave_okay ,
925925 _use_master = use_master )
0 commit comments