Created
March 27, 2015 00:16
-
-
Save j00bar/6966ff758c646fe0d69a to your computer and use it in GitHub Desktop.
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
| def g(): | |
| x = 1 | |
| def f(): | |
| return x * 2 | |
| return f | |
| f = g() | |
| # How can I, from only having a reference to f, access the value of x from the local context of the call to g() that created f? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment