News for hackers. Stuff that matters.
Re:What's Coming in Python 3.8 by ericdevries on Wednesday July 17, 2019 @05:53PM (#20464432)
One of the good things about not using the "=" operator is that you cannot accidentally turn a comparison into an assignment, a feature that is a common cause of errors in other languages that do support it. By adding a completely different character to the operator it is not very likely to cause bugs, compared to just forgetting to type that second =
Re:What's Coming in Python 3.8 by bluecalm on Thursday July 18, 2019 @02:17AM (#20467229)
Is it really that common? I made this typo a few times in my life. It was corrected every time before the program actually run because the compiler warned me about it. I don't see how you can make this mistake if you're not aggressively trying (by turning off warnings for example).
Re:What's Coming in Python 3.8 by ericdevries on Thursday July 18, 2019 @03:57AM (#20467736)
I guess it is not common, but by using the = operator you would not get the warning, and instead get unexpected behaviour.