Python handles globals badly.

Emile van Sebille emile at
Wed Sep 2 21:34:23 CEST 2015

On 9/2/2015 11:47 AM, tdev at wrote:
> I therefore would like to see a PEP which allows also writing
> global module vars inside module functions without the need
> for explicit setting the keyword "global" in more or less each(!)
> module function as the first line of code.

If you're feeling like you need to add global statements to a lot of 
functions to enable variable sharing/access, it may be codesmell 
indicating it's time to make a class of things.


More information about the Python-list mailing list