Skip to content

Commit bcb75cf

Browse files
authored
PYTHON-4294 Add Note on Dict Ordering (#1558)
1 parent f7a7b5a commit bcb75cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/examples/aggregation.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ To achieve this we need to pass in three operations to the pipeline.
4545
First, we need to unwind the ``tags`` array, then group by the tags and
4646
sum them up, finally we sort by count.
4747

48-
As python dictionaries don't maintain order you should use :class:`~bson.son.SON`
49-
or :class:`collections.OrderedDict` where explicit ordering is required
48+
Python dictionaries prior to 3.7 don't maintain order. You should use :class:`~bson.son.SON`
49+
or :class:`collections.OrderedDict` where explicit ordering is required for an older Python version
5050
eg "$sort":
5151

5252
.. note::

0 commit comments

Comments
 (0)