Aw: Re: Re: mypy question
Karsten Hilbert
Karsten.Hilbert at gmx.net
Sat Dec 30 12:19:32 EST 2023
> I'm fairly sure your database queries don't actually give you strings or
> dicts, right? You probably get lists (or iterators) of tuples and
> somewhere you convert them to the arguments you are feeding to
> run_queries().
Ah, no, those queries are enshrined within the middleware as Python strings
with placeholdders. When in need of being run they are assembled into
a list of dicts-enriched-with-arguments-per-query (and fed to run_queries()).
As to what queries *give* me: I have set up psycopg2 to, indeed, hand
me a list of dicts (DictRow instances, that is). Those are then used
in display rather than being fed to run_queries().
Karsten
More information about the Python-list
mailing list