Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

"You can't get very far in this world without your dossier being there first." -- Arthur Miller


devel / comp.lang.python / Re: fCONV_AUSRICHTG is not defined - Why?

SubjectAuthor
o Re: fCONV_AUSRICHTG is not defined - Why?MRAB

1
Re: fCONV_AUSRICHTG is not defined - Why?

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!paganini.bofh.team!2.eu.feeder.erje.net!feeder.erje.net!news-2.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: python@mrabarnett.plus.com (MRAB)
Newsgroups: comp.lang.python
Subject: Re: fCONV_AUSRICHTG is not defined - Why?
Date: Tue, 7 Nov 2023 20:29:43 +0000
Lines: 95
Message-ID: <mailman.201.1699388986.3828.python-list@python.org>
References: <cc011018-94ec-494b-9518-a9dab4ab1488@tompassin.net>
<E3FBBD99-DBC1-468E-88A5-B9FC9F0E5581@sbcglobal.net>
<453a4a28-696f-4999-a65e-c61fb4716310@mrabarnett.plus.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de Wbx+5KqAdpILKXzj+0fsQQC3K4C/x6dogfa9COF7jXPQ==
Cancel-Lock: sha1:KLFCRd/shjRzgMLcmerfz7nWmM4= sha256:qK4sEVZud6eFUQiDnPtkgZAk7S3/HyDBXZzHUfrE2PI=
Return-Path: <python@mrabarnett.plus.com>
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=plus.com header.i=@plus.com header.b=gnrxx1mC;
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.000
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'traceback': 0.04; '(most':
0.05; 'error:': 0.05; 'last):': 0.05; 'subject:Why': 0.07;
'from:addr:python': 0.09; 'happens.': 0.09;
'received:192.168.1.64': 0.09; 'subject:not': 0.09; 'import':
0.15; 'syntax': 0.15; 'from:addr:mrabarnett.plus.com': 0.16;
'from:name:mrab': 0.16; 'message-id:@mrabarnett.plus.com': 0.16;
'python3': 0.16; 'received:84.93': 0.16; 'received:84.93.230':
0.16; 'received:plus.net': 0.16; 'subject:skip:f 10': 0.16;
'wrote:': 0.16; 'python': 0.16; 'pm,': 0.19; 'to:addr:python-
list': 0.20; "i've": 0.22; 'lines': 0.23; 'idea': 0.24; '11,':
0.26; 'leave': 0.27; '>>>': 0.28; 'header:User-Agent:1': 0.30;
'module': 0.31; '"",': 0.32; '13,': 0.32; 'python-list': 0.32;
'received:192.168.1': 0.32; 'but': 0.32; 'there': 0.33; 'header
:In-Reply-To:1': 0.34; 'change': 0.36; 'lists': 0.37; "skip:' 10":
0.37; 'using': 0.37; "it's": 0.37; 'class': 0.37;
'received:192.168': 0.37; 'file': 0.38; 'means': 0.38; '8bit%:14':
0.38; 'two': 0.39; 'list': 0.39; 'define': 0.40; '25,': 0.62;
'follow': 0.62; 'der': 0.69; 'produces': 0.76; 'skip:" 50': 0.84
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plus.com; s=042019;
t=1699388983; bh=KDxUESPFKrEpCe7I45LnEjOq1BSeK7CVJVUeOco+rd8=;
h=Date:Subject:To:References:From:In-Reply-To;
b=gnrxx1mCAkcmotK/Dt4opvQnI+hV4u5ompQ6eqWHgChLXDt1PrGaV+cEM0eD1fK83
+sjORcJ7i5m0WtOq58cmfA1vpQwDWfmll44ndaRI1N1GsfRzwHV8Bf1nBC+qu3DrNT
/pbQ1HgoYB744iTx30KphsXDSE5xDUrYKufh5RMfPZqfkz9tvNwVSPFQktVX6Gz1hb
I1Ofy7dfyVZIthVTJUIbeZVJWMA2zjI4e0iMB4D2Tj2so6mdMKm/x/d8y2xePBRsTe
YdTlq9BoJUKQUA5ZfG1zzi5skUAa/jLYxNpEel1J/71/wlxp/27G/SQfa5byayx5Zl
jhX44Zxnw94Tg==
X-Clacks-Overhead: "GNU Terry Pratchett"
X-CM-Score: 0.00
X-CNFS-Analysis: v=2.4 cv=UtZwis8B c=1 sm=1 tr=0 ts=654a9e37
a=0nF1XD0wxitMEM03M9B4ZQ==:117 a=0nF1XD0wxitMEM03M9B4ZQ==:17
a=IkcTkHD0fZMA:10 a=8AHkEIZyAAAA:8 a=tbmeOjuM7IfBlW9fChAA:9
a=pRoAJsgVLCycHfJm:21 a=QEXdDO2ut3YA:10
X-AUTH: mrabarnett@:2500
User-Agent: Mozilla Thunderbird
Content-Language: en-GB
In-Reply-To: <E3FBBD99-DBC1-468E-88A5-B9FC9F0E5581@sbcglobal.net>
X-CMAE-Envelope: MS4xfCjvNoeca+jfkv0Gs1LQgN214Yk5Q8siyAxkNFAsQ2LwSJ6XHnRDbPWZhBLhbcOCCs5jr9ozls+Q7ZIAR4Cl6bgSZGqZOUGBBL7qH//9fZv94V7LDYuK
oReZH4rQSM92lw5hQrNVG2hgkjYZZL56NcFk2cz+tNFg9uOb4MUsd6tOE+DoMRPnIH4wPosk98L23NoqJ6WRzvirs8lDNJvCV9s=
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: <453a4a28-696f-4999-a65e-c61fb4716310@mrabarnett.plus.com>
X-Mailman-Original-References: <cc011018-94ec-494b-9518-a9dab4ab1488@tompassin.net>
<E3FBBD99-DBC1-468E-88A5-B9FC9F0E5581@sbcglobal.net>
 by: MRAB - Tue, 7 Nov 2023 20:29 UTC

On 2023-11-07 19:20, Jim Schwartz via Python-list wrote:
> Where do you define fCONV_AUSRICHTG? It must be initialized or defined somewhere. Did you leave out a statement from the python 2 version?
>
It's given its value here:

(
fNAME,
fLG1,
fLG2,
fTYP,
fCONV_AUSRICHTG,
fENTRY_AUSRICHTG,
fTEXT_AUSRICHTUNG,
fHOLFUNKT,
fPRUEFFUNKT,
fPRUEF_ARG,
) = list(range(10))

>
>> On Nov 7, 2023, at 1:06 PM, Thomas Passin via Python-list <python-list@python.org> wrote:
>>
>> On 11/7/2023 12:47 PM, Egon Frerich via Python-list wrote:
>>> I've no idea why this happens. In a module there are lists and definitions:
>>> Felder = [
>>> # Name lg1 lg2 typ Ausrichtung Holen Prüfen Prüfvorg
>>> ["Jahr", 4, 5, "u", "", "right", "center"],
>>> ["Monat", 2, 5, "u", "", "right", "center"],
>>> ["Tag", 2, 3, "u", "", "right", "center"],
>>> ["Belegnr", 5, 7, "s", "", "right", "center"],
>>> ["Bank", 2, 4, "u", "", "center", "center"],
>>> ["Art", 2, 3, "u", "", "center", "center"],
>>> ["Aufg", 2, 4, "u", "", "center", "center"],
>>> ["Text", 25, 25, "s", "-", "left", "left"],
>>> ["Ergänzung", 12, 12, "s", "-", "left", "left"],
>>> ["Betrag", 13, 13, "s", "", "right", "right"],
>>> ["W", 1, 2, "s", "", "center", "center"],
>>> ["WBetrag", 7, 7, "s", "", "right", "right"],
>>> ["Kurs", 6, 6, "s", "", "right", "right"],
>>> ]
>>> "Reihenfolge in der Dimension 1"
>>> (
>>> fJAHR,
>>> fMONAT,
>>> fTAG,
>>> fBELEGNR,
>>> fBANK,
>>> fART,
>>> fAUFGABE,
>>> fTEXT,
>>> fTEXTERG,
>>> fBETRAG,
>>> fWAEHRUNG,
>>> fBETRAGinWAEHRUNG,
>>> fUMRECHNUNGSKURS,
>>> ) = list(range(13))
>>> "Reihenfolge in der Dimension 2"
>>> (
>>> fNAME,
>>> fLG1,
>>> fLG2,
>>> fTYP,
>>> fCONV_AUSRICHTG,
>>> fENTRY_AUSRICHTG,
>>> fTEXT_AUSRICHTUNG,
>>> fHOLFUNKT,
>>> fPRUEFFUNKT,
>>> fPRUEF_ARG,
>>> ) = list(range(10))
>>> Two lines with test statements follow and the statement which produces an error:
>>> print(Felder)
>>> print(fJAHR, fNAME, fTYP, fCONV_AUSRICHTG)
>>> akette = "%" + "%".join(
>>> ["%s%s%s " % (i[fCONV_AUSRICHTG], i[fLG2], i[fTYP]) for i in Felder])
>>> The traceback shows:
>>> $ python3 testGeldspurGUI.py
>>> [['Jahr', 4, 5, 'u', '', 'right', 'center'], ['Monat', 2, 5, 'u', '', 'right', 'center'], ['Tag', 2, 3, 'u', '', 'right', 'center'], ['Belegnr', 5, 7, 's', '', 'right', 'center'], ['Bank', 2, 4, 'u', '', 'center', 'center'], ['Art', 2, 3, 'u', '', 'center', 'center'], ['Aufg', 2, 4, 'u', '', 'center', 'center'], ['Text', 25, 25, 's', '-', 'left', 'left'], ['Ergänzung', 12, 12, 's', '-', 'left', 'left'], ['Betrag', 13, 13, 's', '', 'right', 'right'], ['W', 1, 2, 's', '', 'center', 'center'], ['WBetrag', 7, 7, 's', '', 'right', 'right'], ['Kurs', 6, 6, 's', '', 'right', 'right']]
>>> 0 0 3 4
>>> Traceback (most recent call last):
>>> File "/home/egon/Entw/Geldspur/geldspur/testGeldspurGUI.py", line 15, in <module>
>>> from tests.testU2 import testU2
>>> File "/home/egon/Entw/Geldspur/geldspur/tests/testU2.py", line 9, in <module>
>>> from gui.GUI_Konfig import GUIcfg
>>> File "/home/egon/Entw/Geldspur/geldspur/gui/GUI_Konfig.py", line 11, in <module>
>>> class GUIcfg:
>>> File "/home/egon/Entw/Geldspur/geldspur/gui/GUI_Konfig.py", line 90, in GUIcfg
>>> ["%s%s%s " % (i[fCONV_AUSRICHTG], i[fLG2], i[fTYP]) for i in Felder])
>>> File "/home/egon/Entw/Geldspur/geldspur/gui/GUI_Konfig.py", line 90, in <listcomp>
>>> ["%s%s%s " % (i[fCONV_AUSRICHTG], i[fLG2], i[fTYP]) for i in Felder])
>>> NameError: name 'fCONV_AUSRICHTG' is not defined
>>> You see "Felder" and with "0 0 3 4" the correct value 4 for fCONV_AUSRICHTG. But there is the NameError.
>>> What does <listcomp> mean? Is there a change from python2 to python3?
>>
>> You are using a syntax that I don't understand, but "listcomp" means a list comprehenson.
>>


devel / comp.lang.python / Re: fCONV_AUSRICHTG is not defined - Why?

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor