tag:blogger.com,1999:blog-17758483.post115868909934544298..comments2023-09-11T09:02:15.734+01:00Comments on Mind Booster Noori: Python 2.5 is out!Marcos Maradohttp://www.blogger.com/profile/15899709695854674303noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-17758483.post-1158747296901613062006-09-20T11:14:00.000+01:002006-09-20T11:14:00.000+01:00Not insane, just unusual. But - see - while I like...Not insane, just unusual. But - see - while I like the '?' operand you have to agree that <BR/><BR/>(truevalue if condition else falsevalue)<BR/><BR/>is more readable than<BR/><BR/>"condition ? truevalue : falsevalue"<BR/><BR/>...Mind Booster Noorihttps://www.blogger.com/profile/13655245207577274763noreply@blogger.comtag:blogger.com,1999:blog-17758483.post-1158745990055604992006-09-20T10:53:00.000+01:002006-09-20T10:53:00.000+01:00$a = 3 if $b == 1 else $a = 2That's insane! It sta...$a = 3 if $b == 1 else $a = 2<BR/>That's insane! It starts as a postfix notation ($a = 3 if $b == 1) then it passes to a prefix notation (else $a = 2).<BR/>I think postfix notation, in all languages that use them, needs to be better worked. We say something like "a equals three if b equals 1, a equals two otherwise". So a reserved keyword is missing... The "otherwise"! :)<BR/>In the future we'll write:<BR/>$a = 3 if $b == 1,<BR/>$a = 2 otherwise;<BR/><BR/>It seems nasty... Specially when we can do it this way:<BR/>$a = ($b == 1 ? 3 : 2);<BR/>(Quite similar to an infix notation, isn't it?)Manuelhttps://www.blogger.com/profile/11464508897674191899noreply@blogger.com