Hi,
When I read the Python reference (Assignment statements), the documenation doesn't describe an repeated assingment syntax (as far as my BNF knowledge brings me).
Still, if I code a=b=c=d=3, the variables a b c and d get the value 3
If they were interpreted from left to right (like C#) and the assignment were an expression (operator) with the assigned value as the result, it would be ok, but the same documentation doesn't mention this. Also, the assignment is not found among the operators (nor the operator precedence list)
Although it works and doesn't give me any problems, I'm curious about how this relates to the reference: am I overlooking something? (if I want to use the reference to work out about details, I should know how to interpret that reference, and this doesn't seem the case right now)
Kind regards, and thanks in advance,
Jef Daels
When I read the Python reference (Assignment statements), the documenation doesn't describe an repeated assingment syntax (as far as my BNF knowledge brings me).
Still, if I code a=b=c=d=3, the variables a b c and d get the value 3
If they were interpreted from left to right (like C#) and the assignment were an expression (operator) with the assigned value as the result, it would be ok, but the same documentation doesn't mention this. Also, the assignment is not found among the operators (nor the operator precedence list)
Although it works and doesn't give me any problems, I'm curious about how this relates to the reference: am I overlooking something? (if I want to use the reference to work out about details, I should know how to interpret that reference, and this doesn't seem the case right now)
Kind regards, and thanks in advance,
Jef Daels