Steven Bethard a écrit :
(snip)
> Remember that while Python 3 is allowed to break backwards 
> compatibility, it's only supposed to do it when there are concrete 
> benefits. Clearly there are existing use cases for treating bools like 
> ints, e.g. from Alexander Schmolck's email:
> 
>     (x < b) * f(x)
>     -1 ** (i == j)

Both can be cleanly handled using int():

      int(x < b) * f(x)
      -1 ** int(i == j)

Not that I have any clear opinion on the topic FWIW.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to