全部搜索项
jessie  ] [  stretch  ] [  buster  ] [  bullseye  ] [  sid  ]
[ 源代码: python-naturalsort  ]

软件包:python-naturalsort(1.0.3-1.1)

python-naturalsort 的相关链接

Screenshot

Debian 的资源:

下载源码包 python-naturalsort

维护小组:

相似软件包:

Simple natural order sorting API for Python that just works

The ``natsort.natsort()`` function in the ``naturalsort`` package is a very simple alternative to Python's ``sorted()`` function that implements `natural order sorting`_ in Python. The package is available on PyPI, so getting started is very simple:

  $ pip install naturalsort
  $ python
  > from natsort import natsort
  > versions = ['1.8.1-r26', '1.8.1-r30', '2.0-r2', '2.0-r7', '2.0-r11']
  > natsort(['my-package-%s' % v for v in versions])
  ['my-package-1.8.1-r26',
   'my-package-1.8.1-r30',
   'my-package-2.0-r2',
   'my-package-2.0-r7',
   'my-package-2.0-r11']

The main use case that this package was originally created for is sorting of pathnames with versions numbers embedded in them. This is why the sorting key defined by the ``naturalsort`` package ignores filename extensions (not doing so can give unexpected results).

其他与 python-naturalsort 有关的软件包

  • 依赖
  • 推荐
  • 建议
  • 增强

下载 python-naturalsort

下载可用于所有硬件架构的
硬件架构 软件包大小 安装后大小 文件
all 5.7 kB59.0 kB [文件列表]