i was laying in bed thinking about how interpreters work and thought of this hypothetical that i just had to try
@locness3 im not quite sure, im just used to people always doing assignment statements per line, so i guess this just looks wrong
Follow

@kirby
This is called chained assignment: en.wikipedia.org/wiki/Assignme
And it's handled differently in different languages. In Python it seemingly works exactly it would in C, but in fact it's somewhat of a special case.
It's often done one-per-line just to improve readability — so people using different languages won't be confused by behaviour they might not expect.
@locness3

Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml