Skip to content

Commit 9a33331

Browse files
committed
feedback
1 parent 7f3d560 commit 9a33331

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

source/aggregation/aggregation-tutorials/filtered-subset.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff 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

source/connect/mongoclient.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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``

source/run-command.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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.

0 commit comments

Comments
 (0)