You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def f():
b:dict[i32,i32] = {1:2}
print(b.get(3))
print(b.get(3,100))
f()
(lp) C:\Users\kunni\lpython>python try.py
None # When default argument is not given.
100 # When default argument is given the key 3 is expected to take value 100.
(lp) C:\Users\kunni\lpython>src\bin\lpython try.py
3670136 # Expected since Lpython assigns garbage value for i : i32 declarations.
3670136 # Unexpected 100 should be assigned.