File tree Expand file tree Collapse file tree 3 files changed +8
-10
lines changed
aggregation/aggregation-tutorials Expand file tree Collapse file tree 3 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -90,9 +90,7 @@ Tutorial
9090 Next, add a :manual:`$sort
9191 </reference/operator/aggregation/sort>` stage that sorts the
9292 documents in descending order by the ``dateofbirth`` field to
93- list the youngest people first. Because Python dictionaries don't maintain the
94- order of their elements, use a ``SON``or ``OrderedDict`` object
95- instead:
93+ list the youngest people first:
9694
9795 .. literalinclude:: /includes/aggregation/filtered-subset.py
9896 :language: python
Original file line number Diff line number Diff line change @@ -137,13 +137,13 @@ constructor accepts. All parameters are optional.
137137 - ``bson.raw_bson.RawBSONDocument``. To learn more about the ``RawBSONDocument`` class,
138138 see :ref:`pymongo-bson-raw`.
139139
140- - A subclass of the ``collections.abc.Mapping`` type, such as ``bson.son.SON ``.
141- If you specify ``bson.son.SON`` as the document class , you may also specify types
142- for the key and value, as shown in the following example:
140+ - A subclass of the ``collections.abc.Mapping`` type, such as ``OrderedDict ``.
141+ Depending on the strictness of your type-checking rules , you might also need to
142+ specify types for the key and value, as shown in the following example:
143143
144144 .. code-block:: python
145145
146- client = MongoClient(document_class=SON [str, int])
146+ client = MongoClient(document_class=OrderedDict [str, int])
147147
148148 - A subclass of the ``TypedDict`` type. To pass a ``TypedDict`` subclass for this
149149 parameter, you must also include the class in a type hint for your ``MongoClient``
Original file line number Diff line number Diff line change @@ -232,9 +232,9 @@ the class name. The class can be one of the following types:
232232
233233- ``bson.raw_bson.RawBSONDocument``. To learn more about the ``RawBSONDocument`` class,
234234 see :ref:`pymongo-bson-raw`.
235- - A subclass of the ``collections.abc.Mapping`` type, such as ``bson.son.SON ``.
236- If you specify ``bson.son.SON`` as the document class , you must also specify types
237- for the key and value.
235+ - A subclass of the ``collections.abc.Mapping`` type, such as ``OrderedDict ``.
236+ Depending on the strictness of your type-checking rules , you might also need to
237+ specify types for the key and value.
238238- A subclass of the ``TypedDict`` type. To pass a ``TypedDict`` subclass for this
239239 parameter, you must also include the class in a type hint for your ``CodecOptions``
240240 object.
You can’t perform that action at this time.
0 commit comments