sort: Sort documentation should describe most common sort order #48527
Labels
Documentation
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
The docstring for sort.Sort says:
It would be nice if this explained which order data is returned in. I understand that you can call sort.Sort(sort.Reverse(data)), or provide a Less() function that returns true if
i
is greater thanj
, but we could provide some guidance about what is most likely to happen.For example:
Instead of "Usually", could also consider "By default", "When used with the methods in this package", etc.
The text was updated successfully, but these errors were encountered: