Skip to content

Chain assignment order is invalid #45

Description

@gggrafff

Hello!

https://github.com/jprzywoski/python-reference/blob/master/source/docs/operators/assignment.rst#example-2

We have description "First the integer 10 is assigned to the variable c, then the value of c (10) is assigned to b and b is assigned to a" for a = b = c = 10 expression.
The right order: "assigns the single resulting object to each of the target lists, from left to right" (https://docs.python.org/3/reference/simple_stmts.html#assignment-statements)

Have a nice day!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions