def foo(x): if x > 0: y = 10 print(y) foo(10) # geçerli sorun yok #foo(-10) # exception oluşur!