Keep Python Beautiful
Thomas Guettler
pan-newsreader at thomas-guettler.de
Thu Mar 13 13:01:55 EST 2003
On Thu, 13 Mar 2003 05:37:56 +0100, Greg Krohn wrote:
> "Tetsuo" <member16943 at dbforums.com> wrote in message
> news:2635252.1047490747 at dbforums.com...
> Basically, instead of:
>
> if cond:
> a = tval
> else:
> a = fval
>
> You can do:
>
> a = cond ? tval : fval
That's one reason why I love python. The syntax is easy.
Evey newbie should be able to read my code.
Do you like ugly girls? Most persons prefere
nice partners.
I don't like lamda, too. You can always define a function:
def mycmp(a, b):
return cmp(a.myatt, b.myatt)
mylist.sort(mycmp)
I hope Python will stay a beautiful programming language.
thomas
--
Thomas Guettler <guettli at thomas-guettler.de>
http://www.thomas-guettler.de
More information about the Python-list
mailing list