Global: Difference between revisions
Jump to navigation
Jump to search
(Created page with "<!-- In python, the global keyword (lets you write to -->") |
mNo edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{#addbodyclass:tag_tech}} | |||
{{#addbodyclass:tag_prog}} | |||
<!-- | <!-- | ||
In python, the global keyword | |||
In python, the {{inlinecode|global}} keyword lets you write to global scope (variables from the global scope are always visible in narrower scopes, but python assumes that assigning to a variable should be a local variable ''unless declared otherwise'') | |||
nonlocal was added later for a similar reason. | |||
--> | --> |
Latest revision as of 12:21, 17 May 2024