[Python-ideas] Wg: Re: If branch merging

s.krah stefan at bytereef.org
Sun Jun 7 15:08:10 CEST 2015


Chris Angelico<rosuav at gmail.com> wrote:

>>> Oops, I meant to compare a == expr, instead I assigned the result of the 
>>> expression to a. 
>> 
>> In C I've mistyped this perhaps twice, in which case you get a compiler 
>> warning. 
>> 
>> It's a complete non-issue (and the construct *is* very handy). 
 
> That's as may be, but Steven's still correct that the Pythonic way to 
> do it would be with "as".

I agree.  I was mainly responding to the claim that it's a "major source
of bugs" in languages that allow it.


Stefan Krah




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150607/fe3d2f1c/attachment.html>


More information about the Python-ideas mailing list