Skip to content

Instantly share code, notes, and snippets.

@a-recknagel
Created August 20, 2018 10:16
Show Gist options
  • Save a-recknagel/175721d2f85879dfc65c9dff24ede7e2 to your computer and use it in GitHub Desktop.
Save a-recknagel/175721d2f85879dfc65c9dff24ede7e2 to your computer and use it in GitHub Desktop.
assex test, 3.8 pre alpha
>>> f = lambda x: (max(x) - y := min(x)) / y
File "<stdin>", line 1
SyntaxError: can't assign to operator
>>> f = lambda x: (max(x) - (y := min(x))) / y
>>> f([1, 2, 3, 4, 5])
4.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment