Python handles globals badly.
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Thu Dec 4 06:35:52 EST 2014
More information about the Python-list mailing list
Thu Dec 4 06:35:52 EST 2014
- Previous message (by thread): Python handles globals badly.
- Next message (by thread): Python handles globals badly.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
jtan wrote: > How can Skybuck use so much globals. Wouldn't that introduce a lot of > thread safety problems? Of course it would. But I expect that Skybuck probably doesn't even know what threads are. Or if he does, he probably doesn't believe that they should be used. Thread safety is just the start of the problems with global variables: http://c2.com/cgi/wiki?GlobalVariablesAreBad Globals in Python are less bad than in many other languages, since they are localised to a single module only. And the use of a few globals here and there as needed is perfectly fine for small scripts. But using dozens of them to avoid passing arguments to functions, that's just awful code. -- Steven
- Previous message (by thread): Python handles globals badly.
- Next message (by thread): Python handles globals badly.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list