Skip to content

Instantly share code, notes, and snippets.

@ibeauregard
Last active June 12, 2021 16:03
Show Gist options
  • Save ibeauregard/a30cefbedd079f4da3ca87c20d4269e7 to your computer and use it in GitHub Desktop.
Save ibeauregard/a30cefbedd079f4da3ca87c20d4269e7 to your computer and use it in GitHub Desktop.
order_by([('93465', '9832'), ('0', '9832'), ('45783', '547389')],
[Key(1, False), Key(0, True)])
# Works fine
# Ouput: [('45783', '547389'), ('0', '9832'), ('93465', '9832')]
order_by([('93465', 'hi'), ('0', 'hello'), ('45783', 'good day')],
[Key(1, False), Key(0, True)])
# TypeError: bad operand type for unary -: 'str'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment