Skip to content

Enhancement to the version sorting (versorted) output #13

@tdruez

Description

@tdruez

Hi Seth, thanks for the great work on this lib!
I'd like your opinion on something regarding the version sorting.

From https://github.com/SethMMorton/natsort/blob/master/test_natsort/test_natsort.py#L211

>>>  a = ['1.9.9a', '1.11', '1.9.9b', '1.11.4', '1.10.1']

Let's add the '1.11a' version to the list.

>>> a = ['1.9.9a', '1.11', '1.9.9b', '1.11.4', '1.10.1']
>>> natsorted(a)
['1.9.9a', '1.9.9b', '1.10.1', '1.11', '1.11.4', '1.11a']

I think the '1.11a' should be sorted before the '1.11.4'.
What's your take on this? Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions