Ed Leafe wrote:
On Nov 18, 2008, at 4:43 PM, Paul McNett wrote:
But yes, I love iif(), and wish Python had it.
def iif(comp, trueVal, falseVal):
return {True: trueVal, False: falseVal}[bool(comp)]
I think that was one of the first Python scripts I ever wrote!
Or
llNonCust = ( alltrim(QuoteInf.cust_num)=='NONE' )
-Original Message-
From: Matt Slay
Sent: Tuesday, November 18, 2008 5:03 PM
I just love this:
llNonCust=iif(alltrim(QuoteInf.cust_num)=='NONE', .t., .f.)
Rather than:
If alltrim(QuoteInf.cust_num)=='NONE'
On Nov 18, 2008, at 4:02 PM, Matt Slay wrote:
llNonCust=iif(alltrim(QuoteInf.cust_num)=='NONE', .t., .f.)
You like that better than:
llNonCust = (ALLTRIM(QuoteInf.cust_num) == NONE)
-- Ed Leafe
___
Post Messages to: ProFox@leafe.com
Ed Leafe wrote:
On Nov 18, 2008, at 4:43 PM, Paul McNett wrote:
But yes, I love iif(), and wish Python had it.
def iif(comp, trueVal, falseVal):
return {True: trueVal, False: falseVal}[bool(comp)]
I think that was one of the first Python scripts I ever wrote!
I know I
On Nov 18, 2008, at 6:42 PM, Paul McNett wrote:
I know I could write it; I wish it were built-in.
I know you could write it, too; I was just pointing out that my first
instinct in Python was to mimic the way Fox worked. Since then I've
come to appreciate that it isn't built-in.
Ed Leafe wrote:
On Nov 18, 2008, at 6:42 PM, Paul McNett wrote:
I know I could write it; I wish it were built-in.
I know you could write it, too; I was just pointing out that my first
instinct in Python was to mimic the way Fox worked. Since then I've
come to appreciate that
Kind of like play-doh, huh? That was a great article, by the way.
Jeff
Jeff Johnson
[EMAIL PROTECTED]
SanDC, Inc.
623-582-0323
Fax 623-869-0675
Phoenix Python User Group - [EMAIL PROTECTED]
Ed Leafe wrote:
On Nov 18, 2008, at 4:43 PM, Paul McNett wrote:
But yes, I love iif(), and wish
7 matches
Mail list logo