[PyGreSQL] cursor __exit__ __enter__

Marcus Engene mengpg2 at engene.se
Wed May 13 15:01:38 EDT 2009


Hi list!

it would be nice to

def getSet(conn, sql):
    with conn.cursor() as cur:
       return cur.execute(something)

Are you against committing to the 'with' interface (__enter__, __exit__) 
for cursors or has there just been no need for it?

Best regards,
Marcus



More information about the PyGreSQL mailing list