[DB-SIG] conn.close() idempotence

2011-10-18 Thread Daniele Varrazzo
Hello, in a discussion on the psycopg mailing list, an user has been surprised by the fact that .close() called on a closed connection raised error. I thought this was an implementation accident in the driver and a more robust semantics should allow for close to be called on a closed object withou

Re: [DB-SIG] conn.close() idempotence

2011-10-18 Thread Michael Bayer
On Oct 18, 2011, at 8:53 PM, Daniele Varrazzo wrote: > > The DBAPI says about conn.close(): > >The connection will be unusable from this point >forward; an Error (or subclass) exception will be raised >if any operation is attempted with the connection. > > now, is conn.close() an "