help with my first use of a class

Fredrik Lundh fredrik at pythonware.com
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)

</F> 






More information about the Python-list mailing list