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."""
|
||||
xmlrpc = get_xmlrpc_service()
|
||||
languages = xmlrpc.pastes.getLanguages().items()
|
||||
languages.sort(
|
||||
lambda a, b: (a[1].lower() > b[1].lower())-(a[1].lower() < b[1].lower())
|
||||
)
|
||||
languages.sort(key=lambda a: a[1].lower())
|
||||
print('Supported Languages:')
|
||||
for alias, name in languages:
|
||||
print(' %-30s%s' % (alias, name))
|
||||
|
Loading…
Reference in New Issue
Block a user