Path: csiph.com!news.swapon.de!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!newsfeed0.kamp.net!newsfeed.kamp.net!feeder1.cambriumusenet.nl!82.197.223.108.MISMATCH!feeder3.cambriumusenet.nl!feed.tweak.nl!194.109.133.83.MISMATCH!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.05; 'from:addr:yahoo.co.uk': 0.05; '0.02': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; '"object': 0.16; 'attributes.': 0.16; 'globals.': 0.16; 'inclined': 0.16; 'parameter,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'settings)': 0.16; 'wrote:': 0.16; 'app': 0.16; 'language': 0.19; 'lawrence': 0.22; 'minor': 0.22; 'pass': 0.22; 'code.': 0.23; '(like': 0.23; 'passing': 0.23; 'header:In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'parameters': 0.27; 'values': 0.28; 'regular': 0.29; '(my': 0.29; 'url:activestate': 0.29; 'work.': 0.30; 'code': 0.30; 'holds': 0.32; 'language.': 0.32; 'url:code': 0.34; 'something': 0.35; 'sometimes': 0.35; 'but': 0.36; 'too': 0.36; 'to:addr:python- list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'stuff': 0.38; 'hi,': 0.38; 'to:addr:python.org': 0.40; 'mark': 0.40; 'personally': 0.61; 'charset:windows-1252': 0.62; 'more': 0.63; 'our': 0.64; 'pythonistas,': 0.84; 'url:app': 0.84; 'url:recipes': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: Python handles globals badly. Date: Thu, 3 Sep 2015 02:10:54 +0100 References: <253e3584-1d4d-4e6f-b42f-2cdbfa4ad785@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 195.147.66.69 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 28 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1441242669 news.xs4all.nl 23720 [2001:888:2000:d::a6]:36021 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:95911 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