Interpreting Left to right?
Ned Deily
nad at acm.org
Fri Jun 24 16:24:24 EDT 2011
In article <20110624200618.GK6075 at point.cs.wisc.edu>,
Tycho Andersen <tycho at tycho.ws> wrote:
> Yes, I understand that, but I guess I don't understand *why* things
> are done that way. What is the evaluation order principle at work
> here? I would have expected:
>
> tmp = {}
> x['huh'] = tmp # NameEror!
>
> That is, the right hand sides of assignments are evaluated before the
> left hand sides. That is (somehow?) not the case here.
http://docs.python.org/py3k/reference/simple_stmts.html#assignment-statem
ents
--
Ned Deily,
nad at acm.org
More information about the Python-list
mailing list