Merge "Fix sort comparison function"
This commit is contained in:
commit
afb0d7f736
@ -185,9 +185,7 @@ def print_languages():
|
|||||||
"""Print a list of all supported languages, with description."""
|
"""Print a list of all supported languages, with description."""
|
||||||
xmlrpc = get_xmlrpc_service()
|
xmlrpc = get_xmlrpc_service()
|
||||||
languages = xmlrpc.pastes.getLanguages().items()
|
languages = xmlrpc.pastes.getLanguages().items()
|
||||||
languages.sort(
|
languages.sort(key=lambda a: a[1].lower())
|
||||||
lambda a, b: (a[1].lower() > b[1].lower())-(a[1].lower() < b[1].lower())
|
|
||||||
)
|
|
||||||
print('Supported Languages:')
|
print('Supported Languages:')
|
||||||
for alias, name in languages:
|
for alias, name in languages:
|
||||||
print(' %-30s%s' % (alias, name))
|
print(' %-30s%s' % (alias, name))
|
||||||
|
Loading…
Reference in New Issue
Block a user