[Python-Dev] conditional expressions - add parens?

Morel Xavier xavier.morel at masklinn.net
Mon Mar 6 23:23:35 CET 2006

Steve Holden wrote:
> Contrast with the bleeding obvious:
>      level = 0
>      if "absolute_import" in self.futures:
>          level = -1
> regards
>   Steve
The issue that spawned the necessity of a ternary operator in the first 
place was that this syntax is not usable at all in quite a few 
situations like, say, list comprehensions...

More information about the Python-Dev mailing list