Skip to content

Instantly share code, notes, and snippets.

@devmacrile
Created October 11, 2017 20:03
Show Gist options
  • Save devmacrile/d4c282112ebefa064e3a28aafeb0bb80 to your computer and use it in GitHub Desktop.
Save devmacrile/d4c282112ebefa064e3a28aafeb0bb80 to your computer and use it in GitHub Desktop.
Curious about how python handled simultaneous local definition compared to a Lisp example
#(let ((a 1))
# (define (f x)
# (define b (+ a x))
# (define a 5)
# (+ a b))
# (f 10))
a = 1
def f(x):
b = a + x
a = 5
return a + b
print(f(10))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment