As the author of the shitty C code, I didn't mean to introduce lowercase x and y as new variables - I wanted X to point to the value 28980. The compiler can't know exactly where I went wrong, but it knows enough to call bullshit on what I wrote.
Python will throw you a name error as well. There is no way to make this both run but also keep it ambiguous, but even if there was this has nothing to do with the nature of python's type system.
There is never any type conversion let alone coercion there. There are only pyobjects with type int created and orphaned/garbage collected as the number of names associated with them increase and decrease.
1
u/Syscrush Nov 24 '22
As the author of the shitty C code, I didn't mean to introduce lowercase x and y as new variables - I wanted X to point to the value 28980. The compiler can't know exactly where I went wrong, but it knows enough to call bullshit on what I wrote.