[Info] PEP 308 accepted - new conditional expressions

Sion Arrowsmith siona at chiark.greenend.org.uk
Mon Oct 3 10:59:53 EDT 2005


Ron Adam  <rrr at ronadam.com> wrote:
>So ...
>
>   A if B else C + X * Y
>
>Would evaluate as... ?
>
>   A if B else (C + X * Y)

"""In general, 'if' and 'else' bind less tight than everything except
lambda."""

http://mail.python.org/pipermail/python-dev/2005-September/056846.html

-- 
\S -- siona at chiark.greenend.org.uk -- http://www.chaos.org.uk/~sion/
  ___  |  "Frankly I have no feelings towards penguins one way or the other"
  \X/  |    -- Arthur C. Clarke
   her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump



More information about the Python-list mailing list