MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _ordered_dictionary_sort

Function _ordered_dictionary_sort

lib/sqlalchemy/util/_collections.py:258–265  ·  view source on GitHub ↗

Sort an OrderedDict in-place.

(d, key=None)

Source from the content-addressed store, hash-verified

256
257
258def _ordered_dictionary_sort(d, key=None):
259 """Sort an OrderedDict in-place."""
260
261 items = [(k, d[k]) for k in sorted(d, key=key)]
262
263 d.clear()
264
265 d.update(items)
266
267
268OrderedDict = dict

Callers

nothing calls this directly

Calls 2

clearMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected