global variable not working inside function. Increment

Jean-Michel Pichavant jeanmichel at sequans.com
Mon May 13 11:07:41 EDT 2013


> Thank You for setting that straight. I'm just learning Python and
> NONE of the tutorials I read said anything about that . In fact they
> all say a global can be called from inside a Function. If possible
> please contact the ppl that write these things.....I've heard of
> Ocam's razor but not Hanlon's???
> --
> http://mail.python.org/mailman/listinfo/python-list

It's covered by this one:
http://docs.python.org/2/tutorial/classes.html#python-scopes-and-namespaces

It's flagged as a quirk python behavior, and probably could afford a code sample, it can be difficult to grasp from the formal description.

JM


-- IMPORTANT NOTICE: 

The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


More information about the Python-list mailing list