l.s.w.sorting : module documentation

Part of lp.services.webapp

This module contains sorting utility functions.
Function _reversed_number_comparator Return comparison value reversed for numbers only.
Function _identity Undocumented
def _reversed_number_comparator(lhs_text, rhs_text):

Return comparison value reversed for numbers only.

>>> _reversed_number_comparator(u'9.3', u'2.4')
-1
>>> _reversed_number_comparator(u'world', u'hello')
1
>>> _reversed_number_comparator(u'hello world', u'hello world')
0
>>> _reversed_number_comparator(u'dev', u'development')
-1
>>> _reversed_number_comparator(u'bzr-0.13', u'bzr-0.08')
-1
def _identity(x):
Undocumented
API Documentation for Launchpad, generated by pydoctor at 2018-05-26 00:00:07.