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


Groups > comp.lang.python > #95909

Re: Python handles globals badly.

Path csiph.com!news.mixmin.net!newsreader4.netcologne.de!news.netcologne.de!bcyclone04.am1.xlned.com!bcyclone04.am1.xlned.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail
Return-Path <kmisoft@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.013
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'subject:Python': 0.05; '0.02': 0.09; '"object': 0.16; 'attributes.': 0.16; 'globals.': 0.16; 'inclined': 0.16; 'parameter,': 0.16; 'settings)': 0.16; 'app': 0.16; 'minor': 0.22; 'pass': 0.22; 'code.': 0.23; '(like': 0.23; 'passing': 0.23; 'header:In-Reply-To:1': 0.24; 'parameters': 0.27; 'message-id:@mail.gmail.com': 0.27; 'values': 0.28; 'regular': 0.29; '(my': 0.29; 'work.': 0.30; 'code': 0.30; 'holds': 0.32; 'received:google.com': 0.35; 'sometimes': 0.35; 'but': 0.36; 'too': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'stuff': 0.38; 'hi,': 0.38; 'to:addr:python.org': 0.40; 'personally': 0.61; 'more': 0.63; 'url:app': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=x5d1YnW8vzQd5ItRYxbeSjqJRiMW/r9+9WfVOQZdFpA=; b=QcujUv7KIXRycCFLpbZrGN0iv1ereEVi0fTJ+fGyXHcQO/+vTxITUiBGdlhp3veMIG 9vx+UfylCyKeudpxBa4T4islhykoIwvnW7GPWYnHdoMOytu8zhFniiG0HCNiwKBfoCTW ir4epylul9qj2tmxroz+i/+GFkO6OVq1j+PcdwYqK9fZiVserebrPv57NFH9klsZbUyG QSbdOEkh+1J3qw7KTAlf348utnVqaWmdcV7YHJ98h7ktGqQQDf3umkyygRFxgjaKCHS3 tiZNRJat+60oAfZS60zvFaIZyYxsdX9t0c9hUVc84e1pHfq3N1AJSWWS7yvkm/uX5nfq yhtw==
MIME-Version 1.0
X-Received by 10.66.136.102 with SMTP id pz6mr61525425pab.52.1441239407850; Wed, 02 Sep 2015 17:16:47 -0700 (PDT)
In-Reply-To <CALwzidn4iGZNE1u=G++-eKkG5jdN-oXPzrLpuED3xO_EN-Z02w@mail.gmail.com>
References <c3363$547e74fe$5419aafe$24179@news.ziggo.nl> <253e3584-1d4d-4e6f-b42f-2cdbfa4ad785@googlegroups.com> <CALwzidn4iGZNE1u=G++-eKkG5jdN-oXPzrLpuED3xO_EN-Z02w@mail.gmail.com>
Date Wed, 2 Sep 2015 20:16:47 -0400
Subject Re: Python handles globals badly.
From Vladimir Ignatov <kmisoft@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=UTF-8
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.46.1441239411.8327.python-list@python.org> (permalink)
Lines 15
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1441239411 news.xs4all.nl 23728 [2001:888:2000:d::a6]:58404
X-Complaints-To abuse@xs4all.nl
X-Received-Bytes 3521
X-Received-Body-CRC 2627214932
Xref csiph.com comp.lang.python:95909

Show key headers only | View raw


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

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