[DB-SIG] Extensions to DB API 2.0

M.-A. Lemburg mal@lemburg.com
Tue, 27 Nov 2001 10:09:14 +0100


Andy Dustman wrote:
> 
> > > > >     Cursor Attribute .rownumber
> > > > >
> > > > >        This read-only attribute should provide the current 0-based
> > > > >        index of the cursor in the result set or -1 if the index cannot
> > > > >        be determined.
> > > >
> > > > Didn't we decide that None was a better choice for this?
> > >
> > > Correct. I must have forgotten to update this part.
> >
> > mm.. wasn't None for .lastrowid and -1 for .rownumber?
> 
> You could be right. Even so, None is a better return value for
> .rownumber. I don't know for a fact that there are no databases which
> have negative row numbers, but I do know none of them have a row number
> of None...

How about using None for both attributes ?! In retrospective,
I think that using -1 for .rowcount was the wrong decision -- perhaps
we can change that in DB-API spec 3.0 too.

-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Consulting & Company:                           http://www.egenix.com/
Python Software:                        http://www.lemburg.com/python/