seeking deeper (language theory) reason behind Python design choice

Ian Kelly ian.g.kelly at gmail.com
Wed May 16 11:09:06 EDT 2018


On Tue, May 15, 2018, 6:36 PM bartc <bc at freeuk.com> wrote:

> On 16/05/2018 01:04, Steven D'Aprano wrote:
>
> > I'm not a C coder, but I think that specific example would be immune to
> > the bug we are discussing, since (I think) you can't chain assignments in
> > C. Am I right?
>
> Assignments can be chained in C (with right-to-left precedence) as can
> augmented assignments (+= and so on).
>

Yes, but not in the particular example that Steven was referring to, which
you elided from your quoting. open(...) is not a valid LHS for assignment.



More information about the Python-list mailing list