A better way for "except" and "return"?

Syver Enstad syver-en+usenet at online.no
Fri Jan 4 13:17:18 EST 2002


the first thing I see is that you could avoid the two try: except:'s
by moving both calls to curser.execute into one and deleting the rest.

Also I like better to return early on error, so to avoid the final
else you can negate the if expression at the top of the function and
put else code there.

My two cents :-)
-- 

Vennlig hilsen 

Syver Enstad



More information about the Python-list mailing list