Sep-25-2019, 07:21 AM
I think it's because there is nothing such as declaring local variables in python. The choice has been made that assigning a value to a variable implicitly declares this variable as local. The consequence is that you cannot assign a value to a global variable without some further declaration, such as a global statement.