[DB-SIG] DbiDate testing for None
Tue, 03 Mar 1998 15:10:25 -0500
i recently ran into the problem where testing for None for a DbiDate object
causes a segfault. i searched the net and found a post on 3/17/97
regarding the problem but have seen no followup. I'm currently avoiding
the problem by testing "type(x) is not NoneType". does anyone know of a
solution or better work-around?
problem: i discovered the segfault problem using filter(None,list) where
an element of list was a DbiDate object. as shown below. also, "if d:"
causes segfault when d is a DbiDate.
[('PKEY', 'NUMBER', 40, 22, 38, 0, 0), ('DATECLOSED', 'DATE', 75, 7, 0, 0, 1)]
(16, <DbiDate object at c7058>)
this happens on solaris using oracledb and on NT4.0 (pythonwin and python)
DB-SIG - SIG on Tabular Databases in Python
send messages to: firstname.lastname@example.org
administrivia to: email@example.com