(Apr-03-2019, 06:56 AM)mcgrim Wrote: what do you mean? Those variables are declared in line 2,3,4.
If you got fundamentals wrong then your code mostly delivers unexpected results.
If you don't believe ichabod801 then refer to documentation: Python Scopes and Namespaces, Resolution of Names
Quote:The local namespace for a function is created when the function is called, and deleted when the function returns or raises an exception that is not handled within the function. (Actually, forgetting would be a better way to describe what actually happens.)
What happens in Vegas stays in Vegas.
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.