Il giorno mar, 31-08-2004 alle 14:42 -0500, Adrian Holovaty ha scritto:
> Federico Di Gregorio wrote:
> > > It's been great so far, but there appears to be a bug in
> > > cursor.fetchall(). In previous versions (1.14, etc.), it always returned
> > > a list/tuple, regardless of whether any results were found. In the latest
> > > alpha, though,
> > > cursor.fetchall() returns None when no results are found. Shouldn't it
> > > return an empty list, as per the spec?
> >
> > /me hides and a voice says: "fixed right now, will be in next release.."
>
> Hehe, thanks. :) Also, I think I found another one...
>
> The following code no longer works in the psycopg 2 alpha:
>
> for row in iter(cursor.fetchone, None):
> doSomething(row)
>
> Instead of stopping when the iteration is done, it raises an exception --
> "ProgrammingError: no results to fetch".
this is way strange, I'll investigate.
--
Federico Di Gregorio http://people.initd.org/fog
Debian GNU/Linux Developer
fog-8fiUuRrzOP0dnm+yROfE0A@xxxxxxxxxxxxxxxx
INIT.D Developer
fog-NGVKUo/i/6DYtjvyW6yDsg@xxxxxxxxxxxxxxxx
Best friends are often failed lovers. -- Me
signature.asc
Description: Questa parte del messaggio =?ISO-8859-1?Q?=E8?= firmata
_______________________________________________
Psycopg mailing list
Psycopg-IAPFreCvJWPBWskQ1e/+sw@xxxxxxxxxxxxxxxx
http://lists.initd.org/mailman/listinfo/psycopg
|