fCONV_AUSRICHTG is not defined - Why?
dn
PythonList at DancesWithMice.info
Tue Nov 7 13:30:18 EST 2023
On 08/11/2023 06.47, Egon Frerich via Python-list wrote:
> I've no idea why this happens. In a module there are lists and definitions:
...
> ["%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?
Works for me (Python 3.11 on Fedora-Linux 37)
- both as a script, and simple/single import.
What happens when you extract the second dimension's definitions into a
module of their own, and import that (with/out less-sophisticated join)?
--
Regards,
=dn
More information about the Python-list
mailing list