public inbox for [email protected]
help / color / mirror / Atom feedFrom: Rich Shepard <[email protected]>
To: [email protected]
Subject: New user questions
Date: Tue, 13 Jul 2021 13:09:24 -0700 (PDT)
Message-ID: <[email protected]> (raw)
I'm starting to learn psycopg2 and have read the basic module usage doc. Two
questions on syntax:
1) I've seen a number of psycopg2 cursor execute examples where the select
or insert statement is enclosed in a pydoc pair of three double quotes. Most
examples in the basic module usage examples have a single pair of double
quotes enclosing the statement; the named variable examples are exceptions.
Is there a general rule when to use triple double quotes and when to use
single double quotes?
2) How do I write a cursor execute UPDATE statement where the columns and
values to be updated can be single or multiple and the values passed into
the method from the tkinter widgets? Are there examples from which I can
learn?
Regards,
Rich
view thread (10+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: New user questions
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox