Python handles globals badly.

tdev at freenet.de tdev at freenet.de
Thu Sep 3 11:16:26 EDT 2015


Before responding (later) I have to add something additional first: 
About the OO comments


(Note again for this 2nd main topic of this thread: 
  the term "globals" -  it is meant only as the vars of a module outside functions 
			and not sharing vars throughout the app
  the term "global"  - Python keyword for write access inside functions)


Yes OO is a solution but Python invites also developers 
using functional or procedural style. 

I have used OO-terms to make it more visible to OO-developers
or simply cause it is common knowlegde:

I dont have and wanted not compare OO terminology with Python OO structure.

When I have compared OO class members with Python globals
or when I have used e.g. the term singleton than I have described 
the behaviour of a module from OO point of view and to show that 
OO languages need no"global"-keyword to fulfil its tasks, 
and to show that procedural style used in that manner is like 
nearby an OO-solution. 

So you dont need OO under all circumstances. 
There is a procedural/functional way too.


Even other comparisons like type-safety is nothing else
but to show that such languages need  no "global" keyword.


So, mainly with my comparison I tried to argue that there 
is no no need for a "global" keyword.


Said that, I will not respond to comments about using OO
or about comparisons made with other languages.
(And by the way, OO in Python has something similiar (a.k.a "self"-keyword))



More information about the Python-list mailing list