[Python-Dev] chained assignment weirdity

Rob Cliffe rob.cliffe at btinternet.com
Tue Nov 6 16:02:31 CET 2012

On 06/11/2012 12:01, Nick Coghlan wrote:
> As noted, it's really only counterintuitive if your intuition is 
> primed to expect C style right to left chained assignments.
> Python, on the other hand, is able to preserve primarily left to right 
> evaluation in this case with only the far right hand expression 
> needing to be evaluated out of order.
It strikes me that a really intuitive language (at least for Westerners 
who read left-to-right) would write assignments as
     expression --> target
and then the order of assignment in
     expression -> target1 -> target2
could be the natural left-to-right one.
[Sorry, this is more appropriate to Python-ideas, but I couldn't resist 
adding my 2c.]
Rob Cliffe
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/rob.cliffe%40btinternet.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20121106/2792fc1f/attachment.html>

More information about the Python-Dev mailing list