[IronPython] Should DBNull treat as false ?
sakesun at boonthavorn.com
Thu May 15 03:51:28 PDT 2008
Some disambitguity is needed here.
when eval("a == True") is False does not implied "a" is False.
"a" is just not equal to True.
All .NET types actually consider "nonzero" which in turn will be treat as
True in conditional expression.
>>> if System.DBNull: print 'I am something'
I am something
>>> if None: print "This won't show anything"
What I'm asking here is whether should DBNull.Value be considered as False
in conditional expression.
On Thu, 15 May 2008 15:48:37 +0700, Davy Mitchell <daftspaniel at gmail.com>
> DBNull is a type. Appears all .Net types evaluate to False.
> from System import DBNull, Char
> print Char==True
> print DBNull==True
> both will print False.
> On Thu, May 15, 2008 at 9:09 AM, Sakesun Roykiattisak <
> sakesun at boonthavorn.com> wrote:
>> Should DBNull treat as False ?
>> Just a thought.
>> Users mailing list
>> Users at lists.ironpython.com
More information about the Users