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

Stef Mientki stef.mientki at gmail.com
Wed Sep 8 13:09:12 EDT 2010


 hello,

I wrap my database in some class, and on creation of the instance, a connection to the database is
created,
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" ?

thanks,
Stef Mientki




More information about the Python-list mailing list