def connect(*args, **kwargs):
    """Create database connection, use TraceCursor as the cursor_factory."""
    kwargs['cursor_factory'] = TraceCursor
    conn = pg_connect(*args, **kwargs)
    return conn
def connect ( * args , ** kwargs ) : kwargs [ 'cursor_factory' ] = TraceCursor conn = pg_connect ( * args , ** kwargs ) return conn
Create database connection, use TraceCursor as the cursor_factory.