the global keyword:

Lawrence D’Oliveiro lawrencedo99 at gmail.com
Mon Jun 20 01:50:23 EDT 2016


On Monday, June 20, 2016 at 5:16:50 AM UTC+12, Joel Goldstick wrote:
> People who understand global variables generally avoid using them at
> all costs.

I use them occasionally.

> People who don't understand why globals create problems
> seem to want to use them, and then become baffled at the problems they
> cause.

Haven’t encountered any “baffling” problems with them yet.

> If you are learning python, very very low on your list of
> things to learn is global variables.

Probably fair comment.

“nonlocal” is much more fun. ;)


More information about the Python-list mailing list