List Info

Thread: Cursor.description when Cursor.rowcount == 0




Cursor.description when Cursor.rowcount == 0
user name
2006-11-10 18:30:48
On Fri, 2006-11-10 at 11:35 -0500, Art Protin wrote:
> not producing a result is 
> not the same as producing a table of
> zero rows by one or more columns.
> (This is like the distinction between 
> the two comparisons
>                     "" == False
> and
>                    "" is False
> , the empty string has the same 'value' as False while
remaining distinct.)

By the way, neither of these comparisons is true. The empty
string is
neither equal nor identical to False. Coercing the empty
string into a
bool results in False, which equals, and is identical to,
False.

A better analogy for what you're trying to say is the
difference between
None and []. DML/DDL/DCL operations produce no result set,
in the sense
of None. A DQL operation that doesn't return any rows
produces an empty
result set, in the sense of [].

-Carsten


_______________________________________________
DB-SIG maillist  -  DB-SIGpython.org
http:/
/mail.python.org/mailman/listinfo/db-sig
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )