[Zope-DB] Dealing with null values

Matthew T. Kromer matt@zope.com
Thu, 25 Apr 2002 10:03:09 -0400


Paul Browning wrote:

>
> I've got an Oracle table with some null values
> in one column. What's the best way of
> catching these? The Zope len function gives me:
>
> Error Type: TypeError
> Error Value: len() of unsized object
>
> TIA
>
> Paul


NULL is returned as None, which has no length, rather than 0 length -- 
you can test for None if your column is expected to contain NULL values.


-- 
Matt Kromer
Zope Corporation  http://www.zope.com/