are there pros or contras, keeping a connection to a (sqlite) database ?

Stef Mientki stef.mientki at
Wed Sep 8 19:09:12 CEST 2010


I wrap my database in some class, and on creation of the instance, a connection to the database is
and will stay connected until the program exists, something like this:

    self.conn = sqlite3.connect ( self.filename )

Now I wonder if there are pros or contras to keep the connection to the database continuously  "open" ?

Stef Mientki

More information about the Python-list mailing list