Resorted sub-module¶
-
marcxml_parser.tools.resorted.
resorted
(values)[source]¶ Sort values, but put numbers after alphabetically sorted words.
This function is here to make outputs diff-compatible with Aleph.
- Example::
>>> sorted(["b", "1", "a"]) ['1', 'a', 'b'] >>> resorted(["b", "1", "a"]) ['a', 'b', '1']
Parameters: values (iterable) – any iterable object/list/tuple/whatever. Returns: list of sorted values, but with numbers after words