Created
February 23, 2018 22:22
-
-
Save cpcloud/45a5a2af59443218063c78510bd2c625 to your computer and use it in GitHub Desktop.
Goofing off
This file contains hidden or 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
In [6]: from slumba.miniast import * | |
In [7]: from slumba.source import sourcify | |
In [8]: myfunc = def_.silly_func(arg.a)( | |
...: if_( | |
...: load.a == 1, | |
...: return_(load.a + 2), | |
...: return_('Foo') | |
...: ) | |
...: ) | |
In [9]: print(sourcify(myfunc)) | |
def silly_func(a): | |
if a == 1: | |
return a + 2 | |
else: | |
return 'Foo' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's what classes look like: