Last active
July 27, 2017 19:57
-
-
Save dmohs/fd03357fb0dcdfb1278592d3e091531e to your computer and use it in GitHub Desktop.
Python does not have anonymous procedures.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foo = range(10) | |
foo.sort(key=lambda x: -x); print 'foo: '+str(foo) | |
# Suppose something isn't working. Let's try debugging this: | |
foo.sort(key=lambda x: print 'x: '+str(x); -x) # -> Syntax error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment