On 06.11.12 14:01, Nick Coghlan wrote:
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.

I'm surprised, but it is really so.

  >>> {}[print('foo')] = print('bar')
  bar
  foo

I was expecting "foo" before "bar".

Another counterintuitive (and possible wrong) example:

  >>> {print('foo'): print('bar')}
  bar
  foo
  {None: None}


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to