[Zope] How to cat strings together that may be NULL?

Lennart Regebro lennart@torped.se
Sun, 10 Nov 2002 09:44:26 +0100


From: "Greg" <sysman@techgroupinc.com>
> Field3 and Field4 are usually NULL, but not always, so I want to capture
> them as well.
>
> Any suggestions?

Depends on what you want a "None" should be converted to. using str(Field3)
will make it return 'None', which may be wrong. Then you can use (Field3 or
''), which will return '' when Field3 is none.