Documentation, assignment in expression.

Thomas Rachel nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915 at spamschutz.glglgl.de
Mon Mar 26 09:54:52 EDT 2012


Am 26.03.2012 00:59 schrieb Dennis Lee Bieber:

> If you use the longer form
>
> con = db.connect()
> cur = con.cursor()
>
> the cursor object, in all that I've worked with, does function for
> iteration

I use this form regularly with MySQLdb and am now surprised to see that 
this is optional according to http://www.python.org/dev/peps/pep-0249/.

So a database cursor is not required to be iterable, alas.


Thomas




More information about the Python-list mailing list