best practice? null/None vs 'None' vs '' (in web/sql)

Erno Kuusela erno-news at erno.iki.fi
Sat Mar 31 01:55:30 CEST 2001


In article <mailman.985968951.17045.python-list at python.org>,
fluxent at yahoo.com writes:

| I can see that the ODBC result set distinguishes them. But of course 
| when things get rendered out to HTML you don't want to see single 
| quotes around every string value, so 'None' and None become the same 
| thing.

if you are dynamically generating the form, you can omit the fields
that you want to correspond to null. that is conceptually the same
thing as null. (if you are using the cgi module, reember to pass
keep_empty_fields=1 - it defaults to 0 for some reason)

  -- erno



More information about the Python-list mailing list