Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Garbage In, Gospel Out


devel / comp.lang.python / Re: Are these good ideas?

SubjectAuthor
o Re: Are these good ideas?Axy

1
Re: Are these good ideas?

<mailman.982.1668454366.20444.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20379&group=comp.lang.python#20379

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.szaf.org!fu-berlin.de!uni-berlin.de!not-for-mail
From: axy...@declassed.art (Axy)
Newsgroups: comp.lang.python
Subject: Re: Are these good ideas?
Date: Mon, 14 Nov 2022 19:32:25 +0000
Lines: 27
Message-ID: <mailman.982.1668454366.20444.python-list@python.org>
References: <CAP=-cKXmUobHdy7QoZjiUoseDDQt5ErnFRj2OEi+cwjtbg_JLA@mail.gmail.com>
<8e988948-4478-18a0-3b2a-02bcb2b315d3@declassed.art>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de wEblH+O1tnLDXCOcJiFGDgbBX7W2unE5H3tIw0Q0YmCA==
Return-Path: <axy@declassed.art>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=declassed.art header.i=@declassed.art header.b=ak6TIOOH;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.030
X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'comments': 0.03; 'class.':
0.07; 'modules': 0.07; 'wanting': 0.07; 'import': 0.15; 'dicts':
0.16; 'funny,': 0.16; 'layers': 0.16; 'wrote:': 0.16; 'values':
0.17; 'to:addr:python-list': 0.20; 'issue': 0.21; 'maybe': 0.22;
"i'd": 0.24; '(and': 0.25; 'function': 0.27; 'header:User-
Agent:1': 0.30; 'approach': 0.31; 'looked': 0.31; 'module': 0.31;
'here,': 0.32; 'rejected.': 0.32; 'but': 0.32; 'header:In-Reply-
To:1': 0.34; 'functions': 0.36; 'subject:ideas': 0.36; 'could':
0.38; 'two': 0.39; 'on.': 0.39; 'situation': 0.40; 'finally':
0.62; 'pass': 0.64; 'personal': 0.64; 'down': 0.64; 'your': 0.64;
'worked': 0.67; 'exactly': 0.68; 'global': 0.73; 'subject:good':
0.76; 'subject:these': 0.84
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.2.2
Content-Language: en-US
In-Reply-To: <CAP=-cKXmUobHdy7QoZjiUoseDDQt5ErnFRj2OEi+cwjtbg_JLA@mail.gmail.com>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=declassed.art;
i=@declassed.art; q=dns/txt; s=20210603; t=1668454352; h=message-id :
date : mime-version : subject : to : references : from : in-reply-to :
content-type : content-transfer-encoding : from;
bh=AWCWt1KPpAdAIEACLB0o1h/vTgG2gDX6Wt2CTGq0igA=;
b=ak6TIOOHw59MkZ+6sCDI7KgYeTycIhi9Ml7BFVJnfkWHEtelm4oZMh/qDH98wQYg0hmFK
fCVo8czvaejzf3i5Ulmst01rv3TYirNNrat5G5StMQ5vbB0B+1I3K19Vf5VDO/YO3G6QUrs
sNG6moH8LNzGEmg8GyO0nKpQAj1gf/b0M0UlYN9z02SqMuX+eRVrag3M3dkRRUGu8IQ+zd9
bISKbs9CdvOfCXFm8jJ8DKf5LWTtx2YoMtsCdrIOUTIJeqU2WQqwObRVv1rXAqgQ/ffKXhe
Kq+kft9JlihxF0Dn6E9BgCo7gB6/hoIZ2pxgMRhDiqNvFE8ZdFGs43M5Cz3A==
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
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: <https://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>
X-Mailman-Original-Message-ID: <8e988948-4478-18a0-3b2a-02bcb2b315d3@declassed.art>
X-Mailman-Original-References: <CAP=-cKXmUobHdy7QoZjiUoseDDQt5ErnFRj2OEi+cwjtbg_JLA@mail.gmail.com>
 by: Axy - Mon, 14 Nov 2022 19:32 UTC

On 14/11/2022 17:14, Stephen Tucker wrote:
> Hi,
>
> I have two related issues I'd like comments on.
>
> Issue 1 - Global Values

Your "global variables" module acts exactly as a singleton class. Funny,
you could (and maybe you do) write in your functions

import global_vars_module as self

as the first step of refactoring.

From personal experience, when I worked at work we used modules for
globals as well, but over time such an approach looked more and more
ugly and finally was rejected.
> Issue 2 - Passed Parameters
>
> I am now facing another situation where I am wanting to pass 6 or 7
> parameters down through several layers of logic (function A calling
> function B calling ... ) and for results to be passed back.

Nothing fancy here, we used dicts for args and results.

Axy.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor