Created
July 14, 2012 00:19
-
-
Save schmichael/3108419 to your computer and use it in GitHub Desktop.
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 = map(lambda s: | |
# lol my lambda's body is indented | |
s = s.upper() | |
print s | |
return s | |
, ['does', 'the', 'lambda', 'implicitly', 'end', 'after', 'toplevel', 'returns?']) |
Author
schmichael
commented
Jul 14, 2012
from __future__ import print_function
_ = lambda s: (
setattr(__builtins__, 'TMP', s.upper()) or
print(getattr(__builtins__, 'TMP')) or getattr(__builtins__, 'TMP')
)
foo = map(_, ['does', 'the', 'lambda', 'implicitly', 'end', 'after', 'toplevel', 'returns?'])
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment