Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #95911

Re: Python handles globals badly.

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 <python-python-list@m.gmane.org>
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 <breamoreboy@yahoo.co.uk>
Subject Re: Python handles globals badly.
Date Thu, 3 Sep 2015 02:10:54 +0100
References <c3363$547e74fe$5419aafe$24179@news.ziggo.nl> <253e3584-1d4d-4e6f-b42f-2cdbfa4ad785@googlegroups.com> <CALwzidn4iGZNE1u=G++-eKkG5jdN-oXPzrLpuED3xO_EN-Z02w@mail.gmail.com> <CAK_ErkgaGE4C8t4LYYO3N9JEqLmN1=mb=jegX255iQ32-qHzSQ@mail.gmail.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 <CAK_ErkgaGE4C8t4LYYO3N9JEqLmN1=mb=jegX255iQ32-qHzSQ@mail.gmail.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.47.1441242669.8327.python-list@python.org> (permalink)
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

Show key headers only | View raw


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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Python handles globals badly. tdev@freenet.de - 2015-09-02 15:25 -0700
  Re: Python handles globals badly. Ian Kelly <ian.g.kelly@gmail.com> - 2015-09-02 16:57 -0600
  Re: Python handles globals badly. Vladimir Ignatov <kmisoft@gmail.com> - 2015-09-02 20:16 -0400
  Re: Python handles globals badly. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-09-03 02:10 +0100
  Re: Python handles globals badly. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-09-03 02:15 +0100
  Re: Python handles globals badly. "Sven R. Kunze" <srkunze@mail.de> - 2015-09-04 01:06 +0200

csiph-web