A replacement for lambda

Paul Rubin http
Sat Jul 30 18:20:42 EDT 2005


Peter Hansen <peter at engcorp.com> writes:
> >     sign_of_a = ternary{a < 0, -1, 1}
> 
> I'd consider this an interesting idea if it weren't for the fact that
> (at least with the fonts I generally use) I can barely make out the
> difference between the {} and the () above.

Ok, how about an escaped paren:
    sign_of_a = ternary\(a < 0, -1, 1)



More information about the Python-list mailing list