help with my first use of a class

Fredrik Lundh fredrik at
Fri Oct 20 05:27:49 EDT 2006

Bruno Desthuilliers wrote:

> First, notice that you *don't* need a class here to avoid globals.
> Learning to use function as *functions* (ie: taking arguments and
> returning values) instead of procedure would help:
> def random_quote(cursor):
>  c.execute ("SELECT COUNT(Quote) FROM PythonQuoteQuery")

make that "cursor.execute" (etc)


More information about the Python-list mailing list