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


Groups > de.comp.lang.python > #6025

[Python-de] Re: sqlite3-datenbank

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Hartmut Goebel <h.goebel@goebel-consult.de>
Newsgroups de.comp.lang.python
Subject [Python-de] Re: sqlite3-datenbank
Date Sat, 10 Feb 2024 15:11:05 +0100
Organization Goebel Consult
Lines 26
Message-ID <38ce4099-8f14-2179-e19d-a34849b43523@goebel-consult.de> (permalink)
References <000001da5abc$f9c15740$ed4405c0$@t-online.de> <05c6a774-6f07-7d48-2d32-7592955186a0@goebel-consult.de> <000001da5b67$5dd80c10$19882430$@t-online.de>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding base64
X-Trace news.uni-berlin.de N46zkOdawz8M67bk/90aqQPseKPW47HYMslSJlwR+Gmw==
Cancel-Lock sha1:56ZxkR0w70QmIZcqgsguPwPr7xs= sha256:LHzTFgueGrvrp8Yl9Ez3yYXaPv+TIuGVRZdFVCMNhN4=
Authentication-Results mail.python.org; dkim=none reason="no signature"; dkim-adsp=none (unprotected policy); dkim-atps=neutral
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0
Content-Language de-DE, en-US
In-Reply-To <000001da5b67$5dd80c10$19882430$@t-online.de>
X-Noris-IP 87.176.147.10
Message-ID-Hash WHTWW65T5PPH2OY6FUSBUG47DYUJJFN6
X-Message-ID-Hash WHTWW65T5PPH2OY6FUSBUG47DYUJJFN6
X-MailFrom h.goebel@goebel-consult.de
X-Mailman-Rule-Misses dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-python-de.python.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
X-Content-Filtered-By Mailman/MimeDel 3.3.10b1
X-Mailman-Version 3.3.10b1
Precedence list
List-Id Die Deutsche Python Mailingliste <python-de.python.org>
Archived-At <https://mail.python.org/archives/list/python-de@python.org/message/WHTWW65T5PPH2OY6FUSBUG47DYUJJFN6/>
List-Archive <https://mail.python.org/archives/list/python-de@python.org/>
List-Help <mailto:python-de-request@python.org?subject=help>
List-Owner <mailto:python-de-owner@python.org>
List-Post <mailto:python-de@python.org>
List-Subscribe <mailto:python-de-join@python.org>
List-Unsubscribe <mailto:python-de-leave@python.org>
Xref csiph.com de.comp.lang.python:6025

Show key headers only | View raw


Hallo Detlef,

Du hast mir privat geantwortet, nicht an die Liste. Wenn Du privaten 
Support haben möchtest, können wir das gerne kostenpflichtig 
arrangieren, ebenso Vidoe-Mentorin. Ansonsten gilt die Regel: Kostenlose 
Hilfe gibt es nur öffentlich.

Zu Deinem Code:

Er ist sehr, sehr unübersichtlich. Du möchtest frühzeitig lernen, wie 
man lesbarer schreibt, z.B. indem Du F-Strings verwendest oder kürzere 
Variablennamen verwendest. Dann erkennst Du auch leichter den Fehler:

> 		datenfeldstring = eingabe1 + " " + "varchar(" + eingabe2 + "), "

Hier wird der bisherig String überschrieben. D. h. der 
"erzeugungsbefehl" enthält immer nur den Namen der letzten Spalte.

Noch ein paar Tipps:

  * print() ist für Debugging sehr, sehr, hilfreich
  * das Module pdb der Standard-Bibliothek ist auch hilfreich, um Fehler
    zu finden.
  * Du möchtest die "join" Methode von Strings kennenlernen und Dir
    diverse Schleifen in Deinem Code sparen

-- 
Schönen Gruß
Hartmut Goebel
Dipl.-Informatiker (univ), CISSP, CSSLP, ISO 27001 Lead Implementer
Information Security Management, Security Governance, Secure Software 
Development

Goebel Consult, Landshut
http://www.goebel-consult.de

Blog: 
https://www.goebel-consult.de/blog/2019/openstreetmaps-hat-google-maps-weit-ueberholt/ 

Kolumne: 
https://www.goebel-consult.de/blog/cissp-gefluester/2011-10-aus-der-schublade-in-die-koepfe/ 

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


Thread

[Python-de] sqlite3-datenbank "Detlef Heiler" <detlef.heiler@t-online.de> - 2024-02-08 19:31 +0100
  [Python-de] Re: sqlite3-datenbank Hartmut Goebel <h.goebel@goebel-consult.de> - 2024-02-09 09:59 +0100
    [Python-de] Re: sqlite3-datenbank Hartmut Goebel <h.goebel@goebel-consult.de> - 2024-02-10 15:11 +0100
      [Python-de] Re: sqlite3-datenbank "Detlef Heiler" <detlef.heiler@t-online.de> - 2024-02-19 09:53 +0100
  Re: [Python-de] sqlite3-datenbank "Peter J. Holzer" <hjp-usenet4@hjp.at> - 2024-02-09 18:37 +0100

csiph-web