Python handles globals badly.

Mark Lawrence breamoreboy at yahoo.co.uk
Thu Sep 3 03:10:54 CEST 2015


On 03/09/2015 01:16, Vladimir Ignatov wrote:
> Hi,
>
> my 0.02
>
> I don't personally use globals. And don't like "object oriented" code
> (my code more inclined toward "functional" style). But sometimes I
> feel like passing various minor values (like settings) all around app
> via regular parameters is just too much work.  So I use
> "pseudo-global" object which holds various stuff in its attributes.
> And I pass that object around my code. But that is just one parameter,
> not myriads of them.
>
> Vladimir
>
> http://itunes.apple.com/us/app/python-code-samples/id1025613117
>

Conceptually something like this 
https://code.activestate.com/recipes/52308-the-simple-but-handy-collector-of-a-bunch-of-named 
?

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence



More information about the Python-list mailing list