Python Forum
what is the point in function access to globals being read-only?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
what is the point in function access to globals being read-only?
#2
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.
Reply


Messages In This Thread
RE: what is the point in function access to globals being read-only? - by Gribouillis - Sep-25-2019, 07:21 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020