Sep-18-2020, 02:50 PM
The value of v in the program updating. That is shown by the value returned by inc(). For some reason Spyder is looking elsewhere when you ask for the value of v.
This all works as expected in IDLE. What happens if you set the value of v from the consle and call inc()?
This all works as expected in IDLE. What happens if you set the value of v from the consle and call inc()?