Python handles globals badly.

Sven R. Kunze srkunze at mail.de
Wed Sep 2 16:08:17 EDT 2015


On 02.09.2015 20:47, tdev at freenet.de wrote:
> I agree with Skybuck Flying.
> I am aware if a var is a module function var or a module global var.
> If I want read or write a global var.
>
> Using the keyword global inside each(!) function only
> to mark the global var writeable in each of the functions
> is really an over-regulation and very annoying from my point of view.

It reflects the collective experience of programmers, computer 
scientists, and so forth of the last decades.


Globals are evil. Stay away from them.


Best,
Sven



More information about the Python-list mailing list