Adam schrieb:
Suggestion:
Cursor execute function return self (cursor) to allow for code like:
cursor.execute(SQL).fetchall()
instead of
cursor.execute(SQL)
cursor.fetchall()

And since cursors are already iterable, you could also write

for row in con.cursor().execute(sql):
   ...

I agree that this would be quite useful. It seems pyodbc now does the same. There is only a small issue that other implementations and DBAPI1 used to return the rowcount here. But PyGres never did this, and in DBAPI2 it's undefined, so I don't think it's a real problem.

If nobody is against, I'm going to implement this.

-- Christoph

_______________________________________________
PyGreSQL mailing list
[email protected]
http://mailman.vex.net/mailman/listinfo/pygresql

Reply via email to