psycopg simplest problem

Gerhard Häring gh at ghaering.de
Fri Jul 8 19:29:30 EDT 2005


Glauco wrote:
> [...]
> Gerhard thank you very much, this example explain me some idea, but 
> anyway don't resolve the core question.
> In you example when dateVal is a None or textVal is none.
> argument x must be DateTime, not None.
> so i must manipulate for the empty string or None cases

No, you don't. If you leverage the two-parameter form of .execute(many), 
your Python DB-API module will handle the None => NULL case for you 
transparently.

-- Gerhard



More information about the Python-list mailing list