In article <mailman.4824.1388721334.18130.python-l...@python.org>, Chris Angelico <ros...@gmail.com> wrote:
> On Fri, Jan 3, 2014 at 2:33 PM, Steven D'Aprano > <steve+comp.lang.pyt...@pearwood.info> wrote: > > Personally, I find it hard to care about assignment as an expression. I find > > the obvious C-inspired syntax terrible, as it is too easy to mistakenly use > > == instead of = or visa versa: > > Python has similar problems, though. It's inherent to the nature of > symbolic languages. > > a = (1, 2, 3) > b = {1, 2, 3} > > In many fonts, it's hard to tell one from the other without peering. > Do people decry set literal notation in favour of explicitly writing > the word "set"? No; and I think most of us agree that it's better to > have the symbols. At least with == vs = there's a length difference. I > don't think it's C's fault or problem that equality and assignment > look similar and can be used in the same places, any more than it's a > problem to have assignment and subtraction differ by only one stroke: > > a - (1, 2, 3) > > Is that confusingly similar to assignment? > > ChrisA I do this all the time: t0 = time.time() [some code] t1 = time.time() dt = t1 = t0 # <-- spot the typo? -- https://mail.python.org/mailman/listinfo/python-list