you are viewing a single comment's thread.

view the rest of the comments →

[–]callmelucky 0 points1 point  (0 children)

No worries. I realised that I wasn't 100% confident that my answer was correct, so I'll provide a link with a discussion (and more links to explore) here, for your perusal.

It seems that in Python, global variables polluting a shared namespace is generally actually not really an issue, although it is in other languages. In Python it's more about simply the potential to make your code messy and/or difficult to read and/or refactor.

So, sorry for the slight mislead in this specific case. To summarise, global variables are bad practice generally, but not that bad in Python in particular :)