I can 'feel' that global variables are evil. I also read lots of articles proves that (http://wiki.c2.com/?GlobalVariablesAreBad). However, I found CPython Lib use quite a lot of `global` keyword. So how should we use `global` keyword correctly? IIUC, it's fine that we use `global` keyword inside the Lib since most of the time the user just import the lib and call the API. In any other situation, we should avoid using it. Am I right? -- https://mail.python.org/mailman/listinfo/python-list
- How should we use global variables correctly? Windson Yang
- Re: How should we use global variables correctly? Michael Torrie
- Re: How should we use global variables correctly? Cameron Simpson
- Re: How should we use global variables correc... Chris Angelico
- Re: How should we use global variables correctly? Richard Damon
- Re: How should we use global variables correctly? Windson Yang
- Re: How should we use global variables correc... Chris Angelico
- Re: How should we use global variables co... Windson Yang
- Re: How should we use global variabl... Frank Millman
- Re: How should we use global var... Cameron Simpson
- Re: How should we use global... Windson Yang