Created
June 21, 2018 13:18
-
-
Save wwkeyboard/fcc431061b03f401cea7b533e1c1bc05 to your computer and use it in GitHub Desktop.
Runtime error that would be caught by a static type system
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 foo(a): | |
if a['b'] > 1: | |
print("here") | |
def bar(a, b): | |
a['b'] = b | |
b = {} | |
bar(b, 2) | |
foo(b) | |
bar(b, "2") | |
foo(b) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment